From: Greg KH <gregkh@linuxfoundation.org>
To: "Winkler, Tomas" <tomas.winkler@intel.com>
Cc: "arnd@arndb.de" <arnd@arndb.de>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [char-misc 3.10] mei: nfc: fix nfc device freeing
Date: Thu, 6 Jun 2013 11:46:32 -0700 [thread overview]
Message-ID: <20130606184632.GA7475@kroah.com> (raw)
In-Reply-To: <5B8DA87D05A7694D9FA63FD143655C1B028BCE64@HASMSX106.ger.corp.intel.com>
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?
thanks,
greg k-h
prev parent reply other threads:[~2013-06-06 18:46 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-03 6:28 [char-misc 3.10] mei: nfc: fix nfc device freeing Tomas Winkler
2013-06-03 7:25 ` Samuel Ortiz
2013-06-03 14:26 ` Greg KH
2013-06-06 7:57 ` Winkler, Tomas
2013-06-06 18:46 ` Greg KH [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20130606184632.GA7475@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=arnd@arndb.de \
--cc=linux-kernel@vger.kernel.org \
--cc=sameo@linux.intel.com \
--cc=tomas.winkler@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.