All of lore.kernel.org
 help / color / mirror / Atom feed
From: Carlos Corbacho <carlos@strangeworlds.co.uk>
To: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Cc: Matthew Garrett <mjg@redhat.com>,
	Colin Ian King <colin.king@canonical.com>,
	platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] WMI: properly cleanup devices to avoid crashes
Date: Sat, 08 Oct 2011 06:54:33 +0100	[thread overview]
Message-ID: <3053753.3fcxNv2AyB@valkyrie> (raw)
In-Reply-To: <20111006224044.GB30738@core.coreip.homeip.net>

On Thursday 06 Oct 2011 15:40:44 Dmitry Torokhov wrote:
> On Wed, Sep 07, 2011 at 03:00:02PM -0700, Dmitry Torokhov wrote:
> > We need to remove devices that we destroy from the list, otherwise
> > we'll crash if there are more than one "_WDG" methods in DSDT.
> > 
> > This fixes https://bugzilla.kernel.org/show_bug.cgi?id=32052
> > 
> > Tested-by: Ilya Tumaykin <librarian_rus@yahoo.com>
> > Cc: stable@kernel.org
> > Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

Acked-by: Carlos Corbacho <carlos@strangeworlds.co.uk>

> > ---
> 
> * ping *
> 
> >  drivers/platform/x86/wmi.c |    6 +++++-
> >  1 files changed, 5 insertions(+), 1 deletions(-)
> > 
> > diff --git a/drivers/platform/x86/wmi.c b/drivers/platform/x86/wmi.c
> > index f23d5a8..9b88be4 100644
> > --- a/drivers/platform/x86/wmi.c
> > +++ b/drivers/platform/x86/wmi.c
> > @@ -754,9 +754,13 @@ static void wmi_free_devices(void)
> > 
> >  	struct wmi_block *wblock, *next;
> >  	
> >  	/* Delete devices for all the GUIDs */
> > 
> > -	list_for_each_entry_safe(wblock, next, &wmi_block_list, list)
> > +	list_for_each_entry_safe(wblock, next, &wmi_block_list, list) {
> > +		list_del(&wblock->list);
> > 
> >  		if (wblock->dev.class)
> >  		
> >  			device_unregister(&wblock->dev);
> > 
> > +		else
> > +			kfree(wblock);
> > +	}
> > 
> >  }
> >  
> >  static bool guid_already_parsed(const char *guid_string)

      reply	other threads:[~2011-10-08  5:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-09-07 22:00 [PATCH] WMI: properly cleanup devices to avoid crashes Dmitry Torokhov
2011-10-06 22:40 ` Dmitry Torokhov
2011-10-08  5:54   ` Carlos Corbacho [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=3053753.3fcxNv2AyB@valkyrie \
    --to=carlos@strangeworlds.co.uk \
    --cc=colin.king@canonical.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=mjg@redhat.com \
    --cc=platform-driver-x86@vger.kernel.org \
    /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.