Skip to content

Commit

Permalink
bpf: lsm: Remove hook to bpf_task_storage_free
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Martin KaFai Lau <[email protected]>
Acked-by: Matt Bobrowski <[email protected]>
Link: https://patch.msgid.link/[email protected]
  • Loading branch information
liu-song-6 authored and Martin KaFai Lau committed Dec 16, 2024
1 parent 06103dc commit 58ecb3a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion security/bpf/hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down

0 comments on commit 58ecb3a

Please sign in to comment.