public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "Éric Piel" <eric.piel@tremplin-utc.net>
To: Oliver Neukum <oneukum@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Pavel Machek <pavel@ucw.cz>,
	Pavel Herrmann <morpheus.ibis@gmail.com>,
	lm-sensors@lm-sensors.org, linux-kernel@vger.kernel.org,
	stable@kernel.org
Subject: Re: [patch]hp_accel: Fix race in device removal
Date: Fri, 07 May 2010 18:09:55 +0200	[thread overview]
Message-ID: <4BE43B53.9060502@tremplin-utc.net> (raw)
In-Reply-To: <201005071804.20462.oneukum@suse.de>

Op 07-05-10 18:04, Oliver Neukum schreef:
> From 505056649f5ecb1ebb086981243b9870ce961a87 Mon Sep 17 00:00:00 2001
> From: Oliver Neukum <oliver@neukum.org>
> Date: Fri, 7 May 2010 18:02:07 +0200
> Subject: [PATCH] hp_accel: Fix race in device removal
> 
> The work queue has to be flushed after the device has been made
> inaccessible.
> 
> Signed-off-by: Oliver Neukum <oneukum@suse.de>
Ah, flushing the work before unregistering the device seemed more
logical... but now that you mention it, I understand the race.

Thanks

Acked-by: Eric Piel <eric.piel@tremplin-utc.net>


> ---
>  drivers/hwmon/hp_accel.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c
> index c8ab505..7580f55 100644
> --- a/drivers/hwmon/hp_accel.c
> +++ b/drivers/hwmon/hp_accel.c
> @@ -328,8 +328,8 @@ static int lis3lv02d_remove(struct acpi_device *device, int type)
>  	lis3lv02d_joystick_disable();
>  	lis3lv02d_poweroff(&lis3_dev);
>  
> -	flush_work(&hpled_led.work);
>  	led_classdev_unregister(&hpled_led.led_classdev);
> +	flush_work(&hpled_led.work);
>  
>  	return lis3lv02d_remove_fs(&lis3_dev);
>  }


  parent reply	other threads:[~2010-05-07 16:10 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 16:04 [patch]hp_accel: Fix race in device removal Oliver Neukum
2010-05-07 16:07 ` Pavel Machek
2010-05-07 16:09 ` Éric Piel [this message]
2010-05-10 22:46 ` Andrew Morton
2010-05-11  5:55   ` Oliver Neukum
2010-05-11  2:57     ` Andrew Morton
2010-05-11  6:04       ` Oliver Neukum
  -- strict thread matches above, loose matches on Subject: below --
2010-05-07 15:47 Oliver Neukum

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=4BE43B53.9060502@tremplin-utc.net \
    --to=eric.piel@tremplin-utc.net \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=morpheus.ibis@gmail.com \
    --cc=oneukum@suse.de \
    --cc=pavel@ucw.cz \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox