summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2026-10-09 20:18:24 -0700
committerIlpo Järvinen <ilpo.jarvinen@linux.intel.com>2026-10-13 12:06:00 +0300
commit81cdaedb97199f31d8c29733cca74cdc0ef0a0a5 (patch)
tree17f1f40a0429602a16e0aa20f14cb4cdf290c7c0 /tools/perf/scripts/python/export-to-sqlite.py
parent3678e39c6aaeb9aa380c7357b24f7d55955543f8 (diff)
platform/x86: thinkpad_acpi: fix deadlock in hotkey input open/close
Commit d6479c25ecef ("platform/x86: thinkpad_acpi: Use input_device_enabled()") changed hotkey_poll_setup() to acquire tpacpi_inputdev->mutex and call input_device_enabled(tpacpi_inputdev). However, the input core already holds dev->mutex when invoking a device's open() and close() callbacks. Because hotkey_inputdev_open() and hotkey_inputdev_close() call into hotkey_poll_setup(), attempting to acquire tpacpi_inputdev->mutex again results in an immediate self-deadlock. Additionally, locking tpacpi_inputdev->mutex inside hotkey_poll_setup() while holding hotkey_mutex introduces an ABBA lock ordering inversion with hotkey_inputdev_open() and hotkey_inputdev_close(), which acquire hotkey_mutex while holding tpacpi_inputdev->mutex. Finally, input_inhibit_device() calls dev->close() before setting dev->inhibited, so input_device_enabled() still returns true inside hotkey_inputdev_close(). Track whether the input device is active in a driver-local boolean protected by hotkey_mutex instead of locking tpacpi_inputdev->mutex and querying input_device_enabled(). Fixes: d6479c25ecef ("platform/x86: thinkpad_acpi: Use input_device_enabled()") Reported-by: Ali Ahmet Memiş <aliamemis@disroot.org> Closes: https://lore.kernel.org/all/20260930075829.53484-1-aliamemis@disroot.org/ Reported-by: Qiling Zhu <kmatzkaczor244@gmail.com> Closes: https://lore.kernel.org/all/asDVVtAXt8YVbZ3C@ThinkPad/ Reported-by: Oleksii Kryvenko <diver.ua@gmail.com> Closes: https://lore.kernel.org/all/20261010002413.30007-1-krivenko@itstep.org/ Tested-by: Ali Ahmet Memiş <aliamemis@disroot.org> Assisted-by: LLM Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Link: https://patch.msgid.link/20261010031827.3306077-1-dmitry.torokhov@gmail.com Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions