android_kernel_samsung_msm8976/drivers/input/joystick
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
..
iforce Input: iforce - validate number of endpoints before using them 2019-07-27 21:43:44 +02:00
Kconfig
Makefile
a3d.c
adi.c
amijoy.c
analog.c
as5011.c
cobra.c
db9.c
gamecon.c
gf2k.c
grip.c
grip_mp.c
guillemot.c
interact.c
joydump.c
magellan.c
maplecontrol.c
sidewinder.c
spaceball.c
spaceorb.c
stinger.c
tmdc.c
turbografx.c
twidjoy.c
walkera0701.c
warrior.c
xpad.c BACKPORT: Input: xpad - fix oops when attaching an unknown Xbox One gamepad 2019-07-27 21:50:43 +02:00
zhenhua.c