Re: [PATCH] MUSB: fix kernel WARNING/oops when unloading module in OTG mode

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

 



On Thu, Oct 21, 2010 at 11:20:50AM +0100, Jon Povey wrote:
> Sergei Shtylyov wrote:
> > Since commit 461972d8a4c94bc44f11a13046041c78a7cf18dd (musb_core:
> > don't call musb_platform_exit() twice), unloading the driver module
> > results in a WARNING "kobject: '(null)' (c73de788): is not
> > initialized, yet kobject_put() is being called." (or even kernel
> > oops) on e.g. DaVincis, though only in the OTG mode. There exists
> > dubious and unbalanced put_device() call in musb_free() which takes
> > place only in the OTG mode.  As this commit caused
> > musb_platform_exit() to be called (and so unregister the NOP
> > transceiver) before this put_device() call, this function references
> > already freed memory.
> >
> > On the other hand, all the glue layers miss the
> > otg_put_transceiver() call,
> > complementary to the otg_get_transceiver() call that they do.  So, I
> > think the solution is to get rid of the strange put_device() call,
> > and instead call otg_put_transceiver() in the glue layers...
> 
> Too late for a Tested-by: I think, but just to say thanks; I tested
> this today: plain 2.6.36 OOPSes for me on unload, with this patch
> applied, all is quiet.

Nope, not to late, I've added your Tested-by: to the patch now.

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


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

  Powered by Linux