summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorCameron Gutman <aicommander@gmail.com>2016-06-23 10:24:42 -0700
committerCameron Gutman <aicommander@gmail.com>2017-01-29 17:14:10 -0500
commitd240a0a145287caab3601ac48c55d696488ebf1c (patch)
treeb54c9517f38c6acd7b25098908944adb979189c3 /include/linux
parentb5858221c1c4f4bdc9ef67eb75ecf22580368820 (diff)
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: If15a19cde514ffdeddb506da9c4d34479408005a 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>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions