diff options
author | 2023-02-12 19:00:01 +0000 | |
---|---|---|
committer | 2023-02-15 18:18:48 +0100 | |
commit | 76ca8da989c7d97a7f76c75d475fe95a584439d7 (patch) | |
tree | 4e31fbde4f4424f3c2bb39c3fc1225b06e9b881b /lib/parser.c | |
parent | HID: bigben_worker() remove unneeded check on report_field (diff) | |
download | linux-rng-76ca8da989c7d97a7f76c75d475fe95a584439d7.tar.xz linux-rng-76ca8da989c7d97a7f76c75d475fe95a584439d7.zip |
HID: bigben: use spinlock to safely schedule workers
Use spinlocks to deal with workers introducing a wrapper
bigben_schedule_work(), and several spinlock checks.
Otherwise, bigben_set_led() may schedule bigben->worker after the
structure has been freed, causing a use-after-free.
Fixes: 4eb1b01de5b9 ("HID: hid-bigbenff: fix race condition for scheduled work during removal")
Signed-off-by: Pietro Borrello <borrello@diag.uniroma1.it>
Link: https://lore.kernel.org/r/20230125-hid-unregister-leds-v4-3-7860c5763c38@diag.uniroma1.it
Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Diffstat (limited to 'lib/parser.c')
0 files changed, 0 insertions, 0 deletions