summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSong Liu <song@kernel.org>2024-12-11 23:59:56 -0800
committerMartin KaFai Lau <martin.lau@kernel.org>2024-12-16 12:32:31 -0800
commit58ecb3a789fdc2b015112a31a91aa674c040a5ba (patch)
tree14f479361ada138604f0e140c9aaea0a8d426799
parent06103dccbbd29408255a409f6f98f7f02387dc93 (diff)
bpf: lsm: Remove hook to bpf_task_storage_free
free_task() already calls bpf_task_storage_free(). It is not necessary to call it again on security_task_free(). Remove the hook. Signed-off-by: Song Liu <song@kernel.org> Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org> Acked-by: Matt Bobrowski <mattbobrowski@google.com> Link: https://patch.msgid.link/20241212075956.2614894-1-song@kernel.org
-rw-r--r--security/bpf/hooks.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/security/bpf/hooks.c b/security/bpf/hooks.c
index 3663aec7bcbd..db759025abe1 100644
--- a/security/bpf/hooks.c
+++ b/security/bpf/hooks.c
@@ -13,7 +13,6 @@ static struct security_hook_list bpf_lsm_hooks[] __ro_after_init = {
#include <linux/lsm_hook_defs.h>
#undef LSM_HOOK
LSM_HOOK_INIT(inode_free_security, bpf_inode_storage_free),
- LSM_HOOK_INIT(task_free, bpf_task_storage_free),
};
static const struct lsm_id bpf_lsmid = {