lsm,bpf: fix security_bpf_prog_load() error handling#12169
lsm,bpf: fix security_bpf_prog_load() error handling#12169kernel-patches-daemon-bpf[bot] wants to merge 1 commit into
Conversation
|
Upstream branch: b1fcdf9 |
AI reviewed your patch. Please fix the bug or email reply why it's not a bug. In-Reply-To-Subject: |
|
Forwarding comment 4526083059 via email |
b3beebb to
01a7a7f
Compare
|
Upstream branch: eb19eea |
a03af62 to
067515e
Compare
01a7a7f to
f1eeafa
Compare
|
Upstream branch: 8496d90 |
If security_bpf_prog_load() fails there is no need to call into security_bpf_prog_free() as the LSM will handle the cleanup of any partial LSM state before returning to the caller with an error. Thankfully this isn't an issue with any of the existing code as the LSMs which currently provide BPF hook callback implementations don't allocate any internal state, but this is something we want to fix for potential future users. Cc: bpf@vger.kernel.org Cc: linux-security-module@vger.kernel.org Signed-off-by: Paul Moore <paul@paul-moore.com>
067515e to
5740c63
Compare
Pull request for series with
subject: lsm,bpf: fix security_bpf_prog_load() error handling
version: 1
url: https://patchwork.kernel.org/project/netdevbpf/list/?series=1099848