diff options
| author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-07-26 22:07:59 -0700 |
|---|---|---|
| committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2026-08-03 17:06:26 -0700 |
| commit | ad8d3b91e48e1d9b7f94a5cc46cd6e4fd58dc6f5 (patch) | |
| tree | 89b8d11ff839b33abb777dd7cda6271dea328cf3 /tools/perf/scripts/python/export-to-postgresql.py | |
| parent | 761c2040a7d4466c11fb59f3cab94d4078e6da29 (diff) | |
Input: psmouse - clean up locking around disable_work_sync()
In the past, psmouse_disconnect() used cancel_work_sync(). Because
cancel_work_sync() must be called with the psmouse_mutex dropped, and we
needed to prevent psmouse_receive_byte() from re-queueing the work
behind our back, the code transitioned the device to PSMOUSE_CMD_MODE
while holding the mutex, then dropped the mutex and cancelled the work.
When cancel_work_sync() was replaced with disable_work_sync() in this
path, the mutex juggling remained. However, disable_work_sync()
inherently prevents the work from being executed or re-queued, making
the mutex juggling unnecessary.
Clean this up by moving disable_work_sync() to the very top of
psmouse_disconnect(), before we acquire psmouse_mutex.
Assisted-by: Antigravity:gemini-3.5-flash
Link: https://patch.msgid.link/20260727050803.1269941-2-dmitry.torokhov@gmail.com
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions
