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]

 



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.

--
Jon Povey
jon.povey@xxxxxxxxxxxxxxx

Racelogic is a limited company registered in England. Registered number 2743719 .
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, MK18 1TB .

The information contained in this electronic mail transmission is intended by Racelogic Ltd for the use of the named individual or entity to which it is directed and may contain information that is confidential or privileged. If you have received this electronic mail transmission in error, please delete it from your system without copying or forwarding it, and notify the sender of the error by reply email so that the sender's address records can be corrected. The views expressed by the sender of this communication do not necessarily represent those of Racelogic Ltd. Please note that Racelogic reserves the right to monitor e-mail communications passing through its network


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