From 58ecb3a789fdc2b015112a31a91aa674c040a5ba Mon Sep 17 00:00:00 2001 From: Song Liu Date: Wed, 11 Dec 2024 23:59:56 -0800 Subject: [PATCH] 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 Signed-off-by: Martin KaFai Lau Acked-by: Matt Bobrowski Link: https://patch.msgid.link/20241212075956.2614894-1-song@kernel.org --- security/bpf/hooks.c | 1 - 1 file changed, 1 deletion(-) 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 #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 = {