aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/cdns3/cdns3-debug.h
diff options
context:
space:
mode:
authorMilan Landaverde <[email protected]>2022-12-13 12:57:14 -0500
committerDaniel Borkmann <[email protected]>2022-12-14 18:35:41 +0100
commite89f3edffb860a0f54a9ed16deadb7a4a1fa3862 (patch)
treed953d34b8c4be2f7ce66f7d34eb07f0727ac392a /drivers/usb/cdns3/cdns3-debug.h
parenta8dfde09c90109e3a98af54847e91bde7dc2d5c2 (diff)
bpf: prevent leak of lsm program after failed attach
In [0], we added the ability to bpf_prog_attach LSM programs to cgroups, but in our validation to make sure the prog is meant to be attached to BPF_LSM_CGROUP, we return too early if the check fails. This results in lack of decrementing prog's refcnt (through bpf_prog_put) leaving the LSM program alive past the point of the expected lifecycle. This fix allows for the decrement to take place. [0] https://lore.kernel.org/all/[email protected]/ Fixes: 69fd337a975c ("bpf: per-cgroup lsm flavor") Signed-off-by: Milan Landaverde <[email protected]> Signed-off-by: Martin KaFai Lau <[email protected]> Signed-off-by: Daniel Borkmann <[email protected]> Reviewed-by: Stanislav Fomichev <[email protected]> Link: https://lore.kernel.org/r/[email protected]
Diffstat (limited to 'drivers/usb/cdns3/cdns3-debug.h')
0 files changed, 0 insertions, 0 deletions