On 08/23/2012 08:33 PM, Alan Stern wrote:
> On Thu, 23 Aug 2012, Marc Kleine-Budde wrote:
>
>> Otherwise the module's refcount is 0 and it's possible to unload the module,
>> even if the phy is in use.
>
>> @@ -139,8 +140,10 @@ EXPORT_SYMBOL(devm_usb_put_phy);
>> */
>> void usb_put_phy(struct usb_phy *x)
>> {
>> - if (x)
>> + if (x) {
>> put_device(x->dev);
>> + module_put(x->dev->driver->owner);
>> + }
>
> You musn't dereference x->dev after calling put_device(). Instead,
> save x->dev->driver->owner beforehand.Will fix. Tnx, Marc -- Pengutronix e.K. | Marc Kleine-Budde | Industrial Linux Solutions | Phone: +49-231-2826-924 | Vertretung West/Dortmund | Fax: +49-5121-206917-5555 | Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
signature.asc
Description: OpenPGP digital signature
