lkml.org 
[lkml]   [2013]   [Aug]   [20]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subject[PATCH 0/2] usb: fix hub_configure() error handling
Date
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



\
 
 \ /
  Last update: 2013-08-20 19:41    [W:0.074 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site