Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-21 Thread Krzysztof Mazur
On Tue, Aug 20, 2013 at 03:50:37PM -0400, Alan Stern wrote: On Tue, 20 Aug 2013, Krzysztof Mazur wrote: On Tue, Aug 20, 2013 at 02:18:57PM -0400, Alan Stern wrote: On Tue, 20 Aug 2013, Krzysztof Mazur wrote: Ignoring usb_hub_create_port_device() errors cause later NULL pointer

Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-21 Thread Alan Stern
On Wed, 21 Aug 2013, Krzysztof Mazur wrote: We should never have maxchild bNbrPorts (unless maxchild is 0). But just in case we do, changing the code is a good idea. Besides, hub-maxchild is shorter and easier to read than hub-descriptor-bNbrPorts. :-) It's hub-hdev-maxchild,

[PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-20 Thread Krzysztof Mazur
Ignoring usb_hub_create_port_device() errors cause later NULL pointer deference when uninitialized hub-ports[i] entries are dereferenced after port memory allocation error. Signed-off-by: Krzysztof Mazur krzys...@podlesie.net --- I'm not sure if failing in that case is a good idea, but other

Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-20 Thread Alan Stern
On Tue, 20 Aug 2013, Krzysztof Mazur wrote: Ignoring usb_hub_create_port_device() errors cause later NULL pointer deference when uninitialized hub-ports[i] entries are dereferenced after port memory allocation error. Signed-off-by: Krzysztof Mazur krzys...@podlesie.net --- I'm not sure if

Re: [PATCH 2/2] usb: fail on usb_hub_create_port_device() errors

2013-08-20 Thread Alan Stern
On Tue, 20 Aug 2013, Krzysztof Mazur wrote: On Tue, Aug 20, 2013 at 02:18:57PM -0400, Alan Stern wrote: On Tue, 20 Aug 2013, Krzysztof Mazur wrote: Ignoring usb_hub_create_port_device() errors cause later NULL pointer deference when uninitialized hub-ports[i] entries are dereferenced