From: Roderick Colenbrander <roderick.colenbrander@sony.com>
Hi,
This is an updated version of the fix taking Jiri's feedback into
account.
During testing of patches we are currently working on, we noticed
an input device cleanup issue when connecting a single DS4 using
Bluetooth and USB. This issue leads to memory leaks and in some
conditions likely a crash, so we recommend adding the attached
patch. Long-term we probably want to do 'sony_add' checks earlier
on within sony_input_configured as well to prevent any transient
devices from happening in such situation in the first place, but
this patch at least fixes the cleanup.
Thanks,
Roderick
Roderick Colenbrander (1):
HID: sony: Fix input device leak when connecting a DS4 twice using
USB/BT
drivers/hid/hid-sony.c | 2 ++
1 file changed, 2 insertions(+)
--
2.9.3
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
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.
Fixes: ac797b95f532 ("HID: sony: Make the DS4 touchpad a separate device")
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
---
drivers/hid/hid-sony.c | 2 ++
1 file changed, 2 insertions(+)
From: Benjamin Tissoires <hidden> Date: 2017-03-01 17:19:04
On Feb 24 2017 or thereabouts, Roderick Colenbrander wrote:
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
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.
Fixes: ac797b95f532 ("HID: sony: Make the DS4 touchpad a separate device")
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
---
Looks good to me:
Reviewed-by: Benjamin Tissoires <redacted>
From: Roderick Colenbrander <roderick.colenbrander@sony.com>
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.
Fixes: ac797b95f532 ("HID: sony: Make the DS4 touchpad a separate device")
Signed-off-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
I've added -stable anotation and applied to for-4.11/upstream-fixes.
Thanks,
--
Jiri Kosina
SUSE Labs