On 25 March 2013 17:31, Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> wrote: > On Mon, Mar 25, 2013 at 10:50:27AM +0000, David Linares wrote: >> Return an error if hub->descriptor->bNbrPorts==0. Without this additional >> check, we can end up doing a "hub->ports = kzalloc(0, GFP_KERNEL)". >> This hub->ports pointer will therefore be non-NULL and will be used. >> Example of dmesg: >> INIT: usb 1-1: New USB device found, idVendor=0424, idProduct=2512 >> usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0 >> hub 1-1:1.0: USB hub found >> version 2.86 bootinghub 1-1:1.0: 0 ports detected >> Unable to handle kernel NULL pointer dereference at virtual address 00000010 > > How can a hub not have any ports? That kind of defeats the goal of > having a hub at all. > Yeah, I know :-) I am still investigating a few USB issues and one of them was leading to this weird hub init with 0 port. So far, it seems to be a USB power issue. I started another thread to try to get some help. > Not to say your patch isn't good, I'll take it, but this does sound > quite odd. Thanks for taking my very first patch. > > thanks, > > greg k-h -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html