summaryrefslogtreecommitdiff
path: root/include/math-emu
diff options
context:
space:
mode:
authorAlan Stern <stern@rowland.harvard.edu>2014-04-14 13:48:47 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-05-06 07:55:29 -0700
commit297d5df003afe5b1a096ca9877e9c5cc8d99396a (patch)
tree7af2d44d7847c2526d4f4c71c4c96bd1d780e6a1 /include/math-emu
parent4bb7ebb5ec23703c542a38702e4c1a35e6863a39 (diff)
downloadlinux-3.10-297d5df003afe5b1a096ca9877e9c5cc8d99396a.tar.gz
linux-3.10-297d5df003afe5b1a096ca9877e9c5cc8d99396a.tar.bz2
linux-3.10-297d5df003afe5b1a096ca9877e9c5cc8d99396a.zip
USB: fix crash during hotplug of PCI USB controller card
commit a2ff864b53eac9a0e9b05bfe9d1781ccd6c2af71 upstream. The code in hcd-pci.c that matches up EHCI controllers with their companion UHCI or OHCI controllers assumes that the private drvdata fields don't get set too early. However, it turns out that this field gets set by usb_create_hcd(), before hcd-pci expects it, and this can result in a crash when two controllers are probed in parallel (as can happen when a new controller card is hotplugged). The companions_rwsem lock was supposed to prevent this sort of thing, but usb_create_hcd() is called outside the scope of the rwsem. A simple solution is to check that the root-hub pointer has been initialized as well as the drvdata field. This doesn't happen until usb_add_hcd() is called; that call and the check are both protected by the rwsem. This patch should be applied to stable kernels from 3.10 onward. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: Stefani Seibold <stefani@seibold.net> Tested-by: Stefani Seibold <stefani@seibold.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/math-emu')
0 files changed, 0 insertions, 0 deletions