]> git.baikalelectronics.ru Git - kernel.git/commit
HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT
authorRoderick Colenbrander <roderick.colenbrander@sony.com>
Sat, 25 Feb 2017 00:14:15 +0000 (16:14 -0800)
committerJiri Kosina <jkosina@suse.cz>
Mon, 6 Mar 2017 13:43:16 +0000 (14:43 +0100)
commit166496b7bc123bfd3c91a3c96911cd7f7f5a9391
tree437a1d7ac9f5981b20f9869349f9a455873040cc
parente48df5421938c6eadcc370a5827e2ef9c0826e19
HID: sony: Fix input device leak when connecting a DS4 twice using USB/BT

When a user connects a DS4 twice using USB and BT, we reject the
second device connection after the setup work. We then perform
a cleanup, but during cleanup we are not removing the touchpad
device. This leads to leakage of an input device, which we would
never remove. It can likely result into a kernel oops as well
when the touchpad evdev node is accessed and the underlaying HID
device has been removed from the system.

[jkosina@suse.cz: added stable annotation]
Fixes: bfc5b5030303 ("HID: sony: Make the DS4 touchpad a separate device")
Cc: stable@vger.kernel.org
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-sony.c