[lkml]   [2013]   [Jun]   [6]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [char-misc 3.10] mei: nfc: fix nfc device freeing
On Thu, Jun 06, 2013 at 07:57:24AM +0000, Winkler, Tomas wrote:
> >
> > On Mon, Jun 03, 2013 at 09:28:30AM +0300, Tomas Winkler wrote:
> > > The nfc_dev is a static variable and is not cleaned properly upon
> > > reset mainly ndev->cl and ndev->cl_info are not set to NULL after
> > > freeing which
> >
> > Then it needs to be made dynamic, don't paper over the bug by zeroing it
> > out, you really have a much larger issue here that just hasn't hit you yet.
> >
> > No 'struct device' should ever be in a static variable, please fix this properly.
> Greg, I was looking into it and as in realistic configuration is we
> are fine as there is only one possible MEI NFC device on whole system.
> nfc_dev is also not 'a struct device' type is a singleton then holds NFC configuration.

Ah, you are right, my mistake, I would have expected something that
ended with _dev to be a device :)

> Currently changing the behavior would require rather a larger fix and
> this oneliner effectively fixes the crash.
> I don't mind to fix it properly but we are already in rc3, let us know
> what path to go.

Can you resend this so I can apply it?


greg k-h

 \ /
  Last update: 2013-06-06 21:41    [W:0.061 / U:5.900 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site