Commit 2c179ece authored by Rodrigo Rivas Costa's avatar Rodrigo Rivas Costa Committed by Greg Kroah-Hartman
Browse files

HID: steam: fixes race in handling device list.



[ Upstream commit 2d3f53a8 ]

Using uhid and KASAN this driver crashed because it was getting
several connection events where it only expected one. Then the
device was added several times to the static device list and it got
corrupted.

This patch checks if the device is already in the list before adding
it.

Signed-off-by: default avatarRodrigo Rivas Costa <rodrigorivascosta@gmail.com>
Tested-by: default avatarSiarhei Vishniakou <svv@google.com>
Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent 5d273c56
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment