mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [patch]hp_accel: Fix race in device removal
@ 2010-05-07 15:47 Oliver Neukum
  2010-05-07 15:54 ` [lm-sensors] " Jean Delvare
  0 siblings, 1 reply; 3+ messages in thread
From: Oliver Neukum @ 2010-05-07 15:47 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Eric Piel, Pavel Machek, Pavel Herrmann, lm-sensors,
	linux-kernel, stable

>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


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

* Re: [lm-sensors] [patch]hp_accel: Fix race in device removal
  2010-05-07 15:47 [patch]hp_accel: Fix race in device removal Oliver Neukum
@ 2010-05-07 15:54 ` Jean Delvare
  2010-05-07 16:03   ` Oliver Neukum
  0 siblings, 1 reply; 3+ messages in thread
From: Jean Delvare @ 2010-05-07 15:54 UTC (permalink / raw)
  To: Oliver Neukum
  Cc: Andrew Morton, Eric Piel, Pavel Herrmann, linux-kernel,
	lm-sensors, Pavel Machek, stable

Hi Oliver,

On Fri, 7 May 2010 17:47:40 +0200, Oliver Neukum wrote:
> 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);
>  }
>  

You are adding trailing white space. Please don't. Use
scripts/checkpatch.pl to check your patches before you send them.

-- 
Jean Delvare

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

* Re: [lm-sensors] [patch]hp_accel: Fix race in device removal
  2010-05-07 15:54 ` [lm-sensors] " Jean Delvare
@ 2010-05-07 16:03   ` Oliver Neukum
  0 siblings, 0 replies; 3+ messages in thread
From: Oliver Neukum @ 2010-05-07 16:03 UTC (permalink / raw)
  To: Jean Delvare
  Cc: Andrew Morton, Eric Piel, Pavel Herrmann, linux-kernel,
	lm-sensors, Pavel Machek, stable

Am Freitag, 7. Mai 2010 17:54:01 schrieb Jean Delvare:
> Hi Oliver,
> 
> On Fri, 7 May 2010 17:47:40 +0200, Oliver Neukum wrote:
> > 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);
> >  }
> >  
> 
> You are adding trailing white space. Please don't. Use
> scripts/checkpatch.pl to check your patches before you send them.

Thank you. A corrected version is on its way.

	Regards
		Oliver

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

end of thread, other threads:[~2010-05-07 16:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-07 15:47 [patch]hp_accel: Fix race in device removal Oliver Neukum
2010-05-07 15:54 ` [lm-sensors] " Jean Delvare
2010-05-07 16:03   ` Oliver Neukum

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

Powered by JetHome