OpenCloudOS-Kernel/drivers/hid/bpf
Benjamin Tissoires 467fce636a HID: bpf: actually free hdev memory after attaching a HID-BPF program
commit 89be8aa5b0ecb3b729c7bcff64bb2af7921fec63 upstream.

Turns out that I got my reference counts wrong and each successful
bus_find_device() actually calls get_device(), and we need to manually
call put_device().

Ensure each bus_find_device() gets a matching put_device() when releasing
the bpf programs and fix all the error paths.

Cc: <stable@vger.kernel.org>
Fixes: f5c27da4e3 ("HID: initial BPF implementation")
Link: https://lore.kernel.org/r/20240124-b4-hid-bpf-fixes-v2-2-052520b1e5e6@kernel.org
Signed-off-by: Benjamin Tissoires <bentiss@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-02-23 09:24:55 +01:00
..
entrypoints bpf: Replace deprecated -target with --target= for Clang 2023-06-29 15:46:17 +02:00
Kconfig
Makefile
hid_bpf_dispatch.c HID: bpf: actually free hdev memory after attaching a HID-BPF program 2024-02-23 09:24:55 +01:00
hid_bpf_dispatch.h HID: bpf: remove double fdget() 2024-02-23 09:24:55 +01:00
hid_bpf_jmp_table.c HID: bpf: actually free hdev memory after attaching a HID-BPF program 2024-02-23 09:24:55 +01:00