mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] usb: fix hub_configure() error handling
@ 2013-08-20 17:24 Krzysztof Mazur
  2013-08-20 17:24 ` [PATCH 1/2] usb: fix cleanup after failure in hub_configure() Krzysztof Mazur
  2013-08-20 17:24 ` [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors Krzysztof Mazur
  0 siblings, 2 replies; 13+ messages in thread
From: Krzysztof Mazur @ 2013-08-20 17:24 UTC (permalink / raw)
  To: linux-usb
  Cc: Alan Stern, Greg Kroah-Hartman, linux-kernel, Daniel J Blueman,
	Krzysztof Mazur

Hi,

this series fixes hub_configure() error handling that causes hub->ports[i]
NULL pointer dereferences that were previously reported at:

"[PATCH] Prevent USB hub remove oops"
http://marc.info/?l=linux-kernel&m=136189072520909&w=4
https://bugzilla.redhat.com/show_bug.cgi?id=926907

This bug still exists in 3.11-rc6 and I've got an Oops during startup
caused by hub->ports[i] dereference in hub_quiesce().

The first patch implements what Alan Stern suggested in the
"[PATCH] Prevent USB hub remove oops" thread:
  "All of these problems can be fixed in hub_configure by setting
  hub->maxchild to the total number of allocated ports (or 0 if hub_ports
  can't be allocated)."
http://marc.info/?l=linux-usb&m=136189486922963&w=4

The second patch uses slightly different approach because some
users ignore hub->maxchild and use hub->descriptor->bNbrPorts.

Krzysiek

Krzysztof Mazur (2):
  usb: fix cleanup after failure in hub_configure()
  usb: fail on usb_hub_create_port_device() errors

 drivers/usb/core/hub.c | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

-- 
1.8.4.rc1.409.gbd48715


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2013-08-21 14:25 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-20 17:24 [PATCH 0/2] usb: fix hub_configure() error handling Krzysztof Mazur
2013-08-20 17:24 ` [PATCH 1/2] usb: fix cleanup after failure in hub_configure() Krzysztof Mazur
2013-08-20 18:14   ` Alan Stern
2013-08-20 18:42     ` Krzysztof Mazur
2013-08-20 18:59       ` Alan Stern
2013-08-20 19:16         ` Krzysztof Mazur
2013-08-20 19:51           ` Alan Stern
2013-08-20 17:24 ` [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors Krzysztof Mazur
2013-08-20 18:18   ` Alan Stern
2013-08-20 19:07     ` Krzysztof Mazur
2013-08-20 19:50       ` Alan Stern
2013-08-21  9:25         ` Krzysztof Mazur
2013-08-21 14:25           ` Alan Stern

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®