diff options
author | Rodrigo Rivas Costa <rodrigorivascosta@gmail.com> | 2019-03-15 20:09:10 +0100 |
---|---|---|
committer | Siarhei Vishniakou <svv@google.com> | 2019-11-08 17:02:09 +0000 |
commit | 96782880d8c803b61150291630a65bd967901da2 (patch) | |
tree | d8b965ae280330417e54e45536e1497dee583659 /net/ipv4/tcp_ipv4.c | |
parent | 0b7dc1a682f6a1a995760118f45a610298c278ca (diff) |
UPSTREAM: HID: steam: fix deadlock with input devices.
When using this driver with the wireless dongle and some usermode
program that monitors every input device (acpid, for example), while
another usermode client opens and closes the low-level device
repeadedly, the system eventually deadlocks.
The reason is that steam_input_register_device() must not be called with
the mutex held, because the input subsystem has its own synchronization
that clashes with this one: it is possible that steam_input_open() is
called before input_register_device() returns, and since
steam_input_open() needs to lock the mutex, it deadlocks.
However we must hold the mutex when calling any function that sends
commands to the controller. If not, random commands end up falling fail.
Reported-by: Simon Gene Gottlieb <simon@gottliebtfreitag.de>
Signed-off-by: Rodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Tested-by: Simon Gene Gottlieb <simon@gottliebtfreitag.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Bug: 136263708
Change-Id: Ia0c37b3117dc605a30b2e1fb5030282bf2e11a11
(cherry picked from commit 6b538cc21334b83f09b25dec4aa2d2726bf07ed0 ("HID: steam: fix deadlock with input devices."))
https://github.com/torvalds/linux/commit/6b538cc21334b83f09b25dec4aa2d2726bf07ed0
Signed-off-by: Siarhei Vishniakou <svv@google.com>
Diffstat (limited to 'net/ipv4/tcp_ipv4.c')
0 files changed, 0 insertions, 0 deletions