Re: USB: Move hcd free_dev call into usb_disconnect

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2010/1/9 Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>:
> Hi:
>
> USB: Move hcd free_dev call into usb_disconnect
>
> I found a way to oops the kernel bug:
>
> 1. Open a USB device through devio.
> 2. Remove the hcd module in the host kernel.
> 3. Close the devio file descriptor.
>
> The problem is that closing the file descriptor does usb_release_dev
> as it is the last reference.  usb_release_dev then tries to invoke
> the hcd free_dev function (or rather dereferencing the hcd driver
> struct).  This causes an oops as the hcd driver has already been
> unloaded so the struct is gone.

free_dev is introduced for xHCI controller. Is your usb host controller
xHCI?    seems there is few now, :-)

If so, comment for free_dev of hc_driver may be updated with your
patch.


Thanks,

-- 
Lei Ming
--
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

[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux