Re: [PATCH] HID: hid-oxp: use cancel_delayed_work_sync() in remove

From: Jiri Kosina

Date: Fri Sep 11 2026 - 12:10:51 EST


On Fri, 4 Sep 2026, Tristan Madani wrote:

> From: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>
>
> oxp_hid_remove() uses cancel_delayed_work() for all three delayed work
> items. cancel_delayed_work() only dequeues a pending work item without
> waiting for a currently executing callback to finish. If any of the
> work callbacks (oxp_rgb_queue_fn, oxp_btn_queue_fn, oxp_mcu_init_fn) is
> running at the time of removal, the callback continues executing
> concurrently with hid_hw_close() and hid_hw_stop(), accessing the HID
> device after it has been closed and stopped.
>
> Use cancel_delayed_work_sync() instead to ensure that any in-progress
> work callback completes before device teardown proceeds.
>
> Fixes: 84910c459d65 ("HID: hid-oxp: Add OneXPlayer configuration driver")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Tristan Madani <tristan@xxxxxxxxxxxxxxxxxxx>

Applied, thanks.

--
Jiri Kosina
SUSE Labs