From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.linuxfoundation.org ([140.211.169.12]:38476 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751622AbdITJUD (ORCPT ); Wed, 20 Sep 2017 05:20:03 -0400 Subject: Patch "Input: xpad - validate USB endpoint type during probe" has been added to the 4.13-stable tree To: aicommander@gmail.com, andreyknvl@google.com, dmitry.torokhov@gmail.com, gregkh@linuxfoundation.org Cc: , From: Date: Wed, 20 Sep 2017 11:20:07 +0200 Message-ID: <150589920720551@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org List-ID: This is a note to let you know that I've just added the patch titled Input: xpad - validate USB endpoint type during probe to the 4.13-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: input-xpad-validate-usb-endpoint-type-during-probe.patch and it can be found in the queue-4.13 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let know about it. >>From 122d6a347329818419b032c5a1776e6b3866d9b9 Mon Sep 17 00:00:00 2001 From: Cameron Gutman Date: Tue, 12 Sep 2017 11:27:44 -0700 Subject: Input: xpad - validate USB endpoint type during probe From: Cameron Gutman commit 122d6a347329818419b032c5a1776e6b3866d9b9 upstream. We should only see devices with interrupt endpoints. Ignore any other endpoints that we find, so we don't send try to send them interrupt URBs and trigger a WARN down in the USB stack. Reported-by: Andrey Konovalov Tested-by: Andrey Konovalov Signed-off-by: Cameron Gutman Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman --- drivers/input/joystick/xpad.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) --- a/drivers/input/joystick/xpad.c +++ b/drivers/input/joystick/xpad.c @@ -1764,10 +1764,12 @@ static int xpad_probe(struct usb_interfa struct usb_endpoint_descriptor *ep = &intf->cur_altsetting->endpoint[i].desc; - if (usb_endpoint_dir_in(ep)) - ep_irq_in = ep; - else - ep_irq_out = ep; + if (usb_endpoint_xfer_int(ep)) { + if (usb_endpoint_dir_in(ep)) + ep_irq_in = ep; + else + ep_irq_out = ep; + } } if (!ep_irq_in || !ep_irq_out) { Patches currently in stable-queue which might be from aicommander@gmail.com are queue-4.13/input-xpad-validate-usb-endpoint-type-during-probe.patch