linux-security-module.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free
@ 2024-12-12  7:59 Song Liu
  2024-12-12  8:31 ` Matt Bobrowski
  2024-12-16 20:40 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Song Liu @ 2024-12-12  7:59 UTC (permalink / raw)
  To: bpf, linux-kernel, linux-security-module
  Cc: kernel-team, andrii, ast, daniel, martin.lau, kpsingh,
	mattbobrowski, Song Liu

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>

---

This was initially sent in a patchset [1]. However, this patch is not
closely related to other patches in the set, so sending it alone.

[1] https://lore.kernel.org/bpf/20241112083700.356299-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 <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 = {
-- 
2.43.5


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-12-16 20:40 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-12-12  7:59 [PATCH bpf-next] bpf: lsm: Remove hook to bpf_task_storage_free Song Liu
2024-12-12  8:31 ` Matt Bobrowski
2024-12-16 20:40 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).