All of lore.kernel.org
 help / color / mirror / Atom feed
* [KJ] [PATCH] char/snsc: reorder set_current_state() and
@ 2004-10-22 23:57 Nishanth Aravamudan
  2004-10-24 14:11 ` maximilian attems
  0 siblings, 1 reply; 2+ messages in thread
From: Nishanth Aravamudan @ 2004-10-22 23:57 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 962 bytes --]

Any comments would be, as always, appreciated.

-Nish

Description: Reorder add_wait_queue() and set_current_state() as a
signal could be lost in between the two functions.

Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>

--- 2.6.9-bk7-vanilla/drivers/char/snsc.c	2004-10-22 10:40:59.000000000 -0700
+++ 2.6.9-bk7/drivers/char/snsc.c	2004-10-22 14:50:14.000000000 -0700
@@ -192,8 +192,8 @@ scdrv_read(struct file *file, char __use
 		}
 
 		len = CHUNKSIZE;
-		add_wait_queue(&sd->sd_rq, &wait);
 		set_current_state(TASK_INTERRUPTIBLE);
+		add_wait_queue(&sd->sd_rq, &wait);
 		spin_unlock_irqrestore(&sd->sd_rlock, flags);
 
 		schedule_timeout(SCDRV_TIMEOUT);
@@ -288,8 +288,8 @@ scdrv_write(struct file *file, const cha
 			return -EAGAIN;
 		}
 
-		add_wait_queue(&sd->sd_wq, &wait);
 		set_current_state(TASK_INTERRUPTIBLE);
+		add_wait_queue(&sd->sd_wq, &wait);
 		spin_unlock_irqrestore(&sd->sd_wlock, flags);
 
 		schedule_timeout(SCDRV_TIMEOUT);

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

* Re: [KJ] [PATCH] char/snsc: reorder set_current_state() and
  2004-10-22 23:57 [KJ] [PATCH] char/snsc: reorder set_current_state() and Nishanth Aravamudan
@ 2004-10-24 14:11 ` maximilian attems
  0 siblings, 0 replies; 2+ messages in thread
From: maximilian attems @ 2004-10-24 14:11 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 441 bytes --]

On Fri, 22 Oct 2004, Nishanth Aravamudan wrote:

> Any comments would be, as always, appreciated.
> 
> -Nish
> 
> Description: Reorder add_wait_queue() and set_current_state() as a
> signal could be lost in between the two functions.
> 
> Signed-off-by: Nishanth Aravamudan <nacc@us.ibm.com>
applied to kjt,
to get further testing and to be shure it gets upstream.

thanks

--
maks
kernel janitor          http://janitor.kernelnewbies.org/


[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

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

end of thread, other threads:[~2004-10-24 14:11 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-22 23:57 [KJ] [PATCH] char/snsc: reorder set_current_state() and Nishanth Aravamudan
2004-10-24 14:11 ` maximilian attems

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.