public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Tomas Winkler <tomas.winkler@intel.com>
Cc: arnd@arndb.de, linux-kernel@vger.kernel.org,
	Alexander Usyskin <alexander.usyskin@intel.com>
Subject: Re: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
Date: Thu, 17 Jul 2014 18:37:58 -0700	[thread overview]
Message-ID: <20140718013758.GA31846@kroah.com> (raw)
In-Reply-To: <1405583618-8229-5-git-send-email-tomas.winkler@intel.com>

On Thu, Jul 17, 2014 at 10:53:37AM +0300, Tomas Winkler wrote:
> From: Alexander Usyskin <alexander.usyskin@intel.com>
> 
> NFC internal structure cleaning was dropped by commit
> 
> commit 5ad1550a15cd5b75ed8aa3009e162822f720375e
> Author: Tomas Winkler <tomas.winkler@intel.com>
> Date:   Sun Jan 26 11:53:06 2014 +0200
> 
>     mei: Remove all bus devices from the mei_dev list when stopping the MEI
> 
> Bring back cleaning of structure only, because it broke
> host init after host exit scenario (like after S3):
> mei_nfc_host_init checks ndev->cl_info and does nothing if it's dirty.
> 
> Cc: stable@vger.kernel.org # 3.15+
> Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
> Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
> ---
>  drivers/misc/mei/nfc.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
> index 3095fc5..257f01f 100644
> --- a/drivers/misc/mei/nfc.c
> +++ b/drivers/misc/mei/nfc.c
> @@ -553,6 +553,7 @@ void mei_nfc_host_exit(struct mei_device *dev)
>  {
>  	struct mei_nfc_dev *ndev = &nfc_dev;
>  	cancel_work_sync(&ndev->init_work);
> +	memset(ndev, 0, sizeof(struct mei_nfc_dev));

This implies that something is using a "static" device structure, which
isn't allowed by the driver core.  So please fix the root cause here,
don't paper over the bug.

thanks,

greg k-h

  parent reply	other threads:[~2014-07-18  1:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-17  7:53 [char-misc-next 0/5] mei: corner cases bug fixes Tomas Winkler
     [not found] ` <1405583618-8229-5-git-send-email-tomas.winkler@intel.com>
2014-07-18  1:37   ` Greg KH [this message]
2014-07-20  6:30     ` [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit Winkler, Tomas
2014-07-20 15:25       ` Greg KH

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=20140718013758.GA31846@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=alexander.usyskin@intel.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox