Re: [PATCH] musb: sunxi: Fix NULL ptr deref when gadget is registered before musb

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

 



Hi,

On Sat, Jun 04, 2016 at 05:17:50PM +0200, Hans de Goede wrote:
> Stop using the return value of platform_device_register_full() to get to
> the struct musb in sunxi_musb_work(). If a gadget has been registered
> (insmod-ed) before the musb driver, then musb_start will get called
> from the musb_core probe function and sunxi_musb_work() may run before
> platform_device_register_full() has returned.
> 
> Instead store a pointer to struct musb in struct sunxi_glue when
> sunxi_musb_enable gets called. Note that sunxi_musb_enable always gets
> called before sunxi_musb_work() can run.
> 
> Signed-off-by: Hans de Goede <hdegoede@xxxxxxxxxx>

Signed-off-by: Bin Liu <b-liu@xxxxxx>

Regards,
-Bin.
--
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