android_kernel_samsung_msm8976/drivers/input
Cameron Gutman c2cab04c4b BACKPORT: Input: xpad - fix oops when attaching an unknown Xbox One gamepad
Xbox One controllers have multiple interfaces which all have the
same class, subclass, and protocol. One of the these interfaces
has only a single endpoint. When Xpad attempts to bind to this
interface, it causes an oops when trying initialize the output URB
by trying to access the second endpoint's descriptor.

This situation was avoided for known Xbox One devices by checking
the XTYPE constant associated with the VID and PID tuple. However,
this breaks when new or previously unknown Xbox One controllers
are attached to the system.

This change addresses the problem by deriving the XTYPE for Xbox
One controllers based on the interface protocol before checking
the interface number.

Change-Id: I4ff76812beaafe9ba79abb631150e17811109416
Fixes: 1a48ff81b391 ("Input: xpad - add support for Xbox One controllers")
Signed-off-by: Cameron Gutman <aicommander@gmail.com>
Cc: stable@vger.kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Git-commit: 7bbfe460f9428724ca1eda618c32eb0e2018c30c
Git-repo: https://android.googlesource.com/kernel/common.git
Signed-off-by: Srinivasarao P <spathi@codeaurora.org>
2019-07-27 21:50:43 +02:00
..
gameport
joystick BACKPORT: Input: xpad - fix oops when attaching an unknown Xbox One gamepad 2019-07-27 21:50:43 +02:00
keyboard
misc Input: uinput - avoid crash when sending FF request to device going away 2019-07-27 21:45:49 +02:00
mouse
serio
tablet
touchscreen input: synaptics_dsx: remove unused synaptics touch screen driver files 2019-07-27 21:46:00 +02:00
apm-power.c
evbug.c
evdev.c
ff-core.c
ff-memless.c
hall_sensor.c
input-compat.c
input-compat.h
input-mt.c
input-polldev.c
input.c Input: do not emit unneeded EV_SYN when suspending 2019-07-27 21:45:59 +02:00
joydev.c
Kconfig
keycombo.c
keyreset.c
Makefile
matrix-keymap.c
mousedev.c
sec_cmd.c
sparse-keymap.c