linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Eric Piel <eric.piel@tremplin-utc.net>,
	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: [patch]hp_accel: Fix race in device removal
Date: Fri, 7 May 2010 17:47:40 +0200	[thread overview]
Message-ID: <201005071747.40801.oneukum@suse.de> (raw)

>From 64a9e0d8e585c65526248e6cf1659a13fb01a93a Mon Sep 17 00:00:00 2001
From: Oliver Neukum <oliver@neukum.org>
Date: Fri, 7 May 2010 17:41:59 +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>
---
 drivers/hwmon/hp_accel.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/hwmon/hp_accel.c b/drivers/hwmon/hp_accel.c
index c8ab505..6f6e05d 100644
--- a/drivers/hwmon/hp_accel.c
+++ b/drivers/hwmon/hp_accel.c
@@ -328,9 +328,9 @@ 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);
 }
 
-- 
1.6.4.2


             reply	other threads:[~2010-05-07 15:48 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-07 15:47 Oliver Neukum [this message]
2010-05-07 15:54 ` [lm-sensors] [patch]hp_accel: Fix race in device removal Jean Delvare
2010-05-07 16:03   ` Oliver Neukum
2010-05-07 16:04 Oliver Neukum
2010-05-07 16:07 ` Pavel Machek
2010-05-07 16:09 ` Éric Piel
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

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=201005071747.40801.oneukum@suse.de \
    --to=oneukum@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=eric.piel@tremplin-utc.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lm-sensors@lm-sensors.org \
    --cc=morpheus.ibis@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).