Re: [PATCH] usb: core: endpoint: Fix error path

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

 



2010/10/2 Rahul Ruikar <rahul.ruikar@xxxxxxxxx>:
> Thanks Ming.
> I have certain doubts related to device_unregister()
>
> In some of USB related code..
> kfree() is called after device_unregister() ...  device_unregister()
> also internally calls put_device()... is that correct behavior or I'm
> missing something here..

If no other external reference to device before put_device in device_unregister,
dev.release will be called from put_device to free something, which depends
on your implement for dev.release.

> ex.
> file : drivers/usb/gadget/fsl_udc_core.c
> function : static int __init fsl_udc_probe(struct platform_device *pdev)

Once reaches err_unregister, double free of udc_controller may be
triggered, so fix should be needed.

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