[linux] 02/02: Revert "usb: hub: do not clear BOS field during reset device" (Closes: #820176)

debian-kernel at lists.debian.org debian-kernel at lists.debian.org
Fri Apr 8 00:45:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

benh pushed a commit to branch jessie-updates
in repository linux.

commit 0ba4f3da925c938a06b144d43b82e87b9c857f1b
Author: Ben Hutchings <ben at decadent.org.uk>
Date:   Wed Apr 6 16:59:18 2016 +0100

    Revert "usb: hub: do not clear BOS field during reset device" (Closes: #820176)
---
 debian/changelog                                   |  2 +
 ...hub-do-not-clear-bos-field-during-reset-d.patch | 61 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 3 files changed, 64 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index f6cffa4..d9b052d 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,6 +4,8 @@ linux (3.16.7-ckt25-2) UNRELEASED; urgency=medium
     (Closes: #819881)
   * Revert "drm/radeon: call hpd_irq_event on resume", reported to cause
     regressions (crash/hang) on some systems
+  * Revert "usb: hub: do not clear BOS field during reset device"
+    (Closes: #820176)
 
  -- Ben Hutchings <ben at decadent.org.uk>  Thu, 07 Apr 2016 22:32:39 +0100
 
diff --git a/debian/patches/bugfix/all/revert-usb-hub-do-not-clear-bos-field-during-reset-d.patch b/debian/patches/bugfix/all/revert-usb-hub-do-not-clear-bos-field-during-reset-d.patch
new file mode 100644
index 0000000..29288d0
--- /dev/null
+++ b/debian/patches/bugfix/all/revert-usb-hub-do-not-clear-bos-field-during-reset-d.patch
@@ -0,0 +1,61 @@
+From: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+Date: Sat, 20 Feb 2016 14:19:34 -0800
+Subject: Revert "usb: hub: do not clear BOS field during reset device"
+Origin: https://git.kernel.org/linus/e5bdfd50d6f76077bf8441d130c606229e100d40
+
+This reverts commit d8f00cd685f5c8e0def8593e520a7fef12c22407.
+
+Tony writes:
+
+This upstream commit is causing an oops:
+d8f00cd685f5 ("usb: hub: do not clear BOS field during reset device")
+
+This patch has already been included in several -stable kernels.  Here
+are the affected kernels:
+4.5.0-rc4 (current git)
+4.4.2
+4.3.6 (currently in review)
+4.1.18
+3.18.27
+3.14.61
+
+How to reproduce the problem:
+Boot kernel with slub debugging enabled (otherwise memory corruption
+will cause random oopses later instead of immediately)
+Plug in USB 3.0 disk to xhci USB 3.0 port
+dd if=/dev/sdc of=/dev/null bs=65536
+(where /dev/sdc is the USB 3.0 disk)
+Unplug USB cable while dd is still going
+Oops is immediate:
+
+Reported-by: Tony Battersby <tonyb at cybernetics.com>
+Cc: Du, Changbin <changbin.du at intel.com>
+Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
+---
+ drivers/usb/core/hub.c | 8 +++-----
+ 1 file changed, 3 insertions(+), 5 deletions(-)
+
+--- a/drivers/usb/core/hub.c
++++ b/drivers/usb/core/hub.c
+@@ -5387,6 +5387,7 @@ static int usb_reset_and_verify_device(s
+ 	}
+ 
+ 	bos = udev->bos;
++	udev->bos = NULL;
+ 
+ 	for (i = 0; i < SET_CONFIG_TRIES; ++i) {
+ 
+@@ -5479,11 +5480,8 @@ done:
+ 	usb_set_usb2_hardware_lpm(udev, 1);
+ 	usb_unlocked_enable_lpm(udev);
+ 	usb_enable_ltm(udev);
+-	/* release the new BOS descriptor allocated  by hub_port_init() */
+-	if (udev->bos != bos) {
+-		usb_release_bos_descriptor(udev);
+-		udev->bos = bos;
+-	}
++	usb_release_bos_descriptor(udev);
++	udev->bos = bos;
+ 	return 0;
+ 
+ re_enumerate:
diff --git a/debian/patches/series b/debian/patches/series
index cf5b7b1..ff31076 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -658,3 +658,4 @@ bugfix/all/xfrm-override-skb-mark-with-tunnel-parm.i_key-in-xfr.patch
 bugfix/all/ip_vti-ip6_vti-preserve-skb-mark-after-rcv_cb-call.patch
 bugfix/all/revert-drm-radeon-hold-reference-to-fences-in-radeon.patch
 bugfix/all/revert-drm-radeon-call-hpd_irq_event-on-resume.patch
+bugfix/all/revert-usb-hub-do-not-clear-bos-field-during-reset-d.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/kernel/linux.git



More information about the Kernel-svn-changes mailing list