]> git.hungrycats.org Git - linux/commit
HID: hid-lenovo-go-s: Prevent deadlock if device removed during setup
authorDerek J. Clark <derekjohn.clark@gmail.com>
Mon, 14 Sep 2026 22:52:56 +0000 (15:52 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 6 Nov 2026 17:10:51 +0000 (12:10 -0500)
commitdf2b31428cb2e6c8f8fec8225b42e5e8d85bf7ee
tree67ee1366109e021a87b072ae0e60a51e736ff1cc
parent9d918eadad41fe956185f3e3974e15e426a12de4
HID: hid-lenovo-go-s: Prevent deadlock if device removed during setup

commit 0ef3036c68979194fdee77a3a825fb94ef307a54 upstream.

hid_gos_cfg_remove() calls a mutex before canceling delayed work. That
delayed work function calls mcu_property_out(), which holds the same mutex.
Prevent deadlock my removing the mutex prior to stopping the work.
Additionally, since cancel_delayed_work has the potential to re-arm,
switch to disable_delayed_work.

Fixes: a23f3497bf208c59ad ("HID: hid-lenovo-go-s: Add Lenovo Legion Go S Series HID Driver")
Cc: stable@vger.kernel.org
Signed-off-by: Derek J. Clark <derekjohn.clark@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hid/hid-lenovo-go-s.c