public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [char-misc-next 0/5] mei: corner cases bug fixes
@ 2014-07-17  7:53 Tomas Winkler
       [not found] ` <1405583618-8229-5-git-send-email-tomas.winkler@intel.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Tomas Winkler @ 2014-07-17  7:53 UTC (permalink / raw)
  To: gregkh; +Cc: arnd, linux-kernel, Tomas Winkler

Set of fixes that covers few corner cases

Alexander Usyskin (5):
  mei: reset client connection state on timeout
  mei: start disconnect request timer consistently
  mei: don't schedule suspend in pm idle
  mei: nfc: clean nfc internal struct on host exit
  mei: fix return value on disconnect timeout

 drivers/misc/mei/client.c  | 17 +++++++----------
 drivers/misc/mei/nfc.c     |  1 +
 drivers/misc/mei/pci-me.c  |  2 +-
 drivers/misc/mei/pci-txe.c |  2 +-
 4 files changed, 10 insertions(+), 12 deletions(-)

-- 
1.9.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
       [not found] ` <1405583618-8229-5-git-send-email-tomas.winkler@intel.com>
@ 2014-07-18  1:37   ` Greg KH
  2014-07-20  6:30     ` Winkler, Tomas
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2014-07-18  1:37 UTC (permalink / raw)
  To: Tomas Winkler; +Cc: arnd, linux-kernel, Alexander Usyskin

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
  2014-07-18  1:37   ` [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit Greg KH
@ 2014-07-20  6:30     ` Winkler, Tomas
  2014-07-20 15:25       ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Winkler, Tomas @ 2014-07-20  6:30 UTC (permalink / raw)
  To: Greg KH; +Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, Usyskin, Alexander

> > @@ -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.
>
You are partially correct as this is not the 'struct device' it just a nfc singleton in any case it is not really nice
and  we have the fix in queue but it is rather extensive rework and  I guess it won't be suitable for stable
so hence this one liner fix.

Thanks
Tomas
 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit
  2014-07-20  6:30     ` Winkler, Tomas
@ 2014-07-20 15:25       ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2014-07-20 15:25 UTC (permalink / raw)
  To: Winkler, Tomas
  Cc: arnd@arndb.de, linux-kernel@vger.kernel.org, Usyskin, Alexander

On Sun, Jul 20, 2014 at 06:30:16AM +0000, Winkler, Tomas wrote:
> > > @@ -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.
> >
> You are partially correct as this is not the 'struct device' it just a nfc singleton in any case it is not really nice
> and  we have the fix in queue but it is rather extensive rework and  I guess it won't be suitable for stable
> so hence this one liner fix.

It shouldn't be a huge rework to make a static variable dynamic, right?
Please do it correctly.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-20 15:25 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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   ` [char-misc-next 4/5] mei: nfc: clean nfc internal struct on host exit Greg KH
2014-07-20  6:30     ` Winkler, Tomas
2014-07-20 15:25       ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox