[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <AANLkTim1SDjhautuTiSO5hStD3qAKa5GUanF3aP51UYT@mail.gmail.com>
Date: Sat, 2 Oct 2010 18:28:39 +0800
From: Ming Lei <tom.leiming@...il.com>
To: Rahul Ruikar <rahul.ruikar@...il.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>, Tejun Heo <tj@...nel.org>,
asanchez@...rowork.net, rjw@...k.pl, linux-usb@...r.kernel.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH] usb: core: endpoint: Fix error path
2010/10/2 Rahul Ruikar <rahul.ruikar@...il.com>:
> 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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists