* [KJ] [PATCH] Replacing current->state with set_current_state
@ 2007-04-30 17:48 Jestin Stoffel
0 siblings, 0 replies; only message in thread
From: Jestin Stoffel @ 2007-04-30 17:48 UTC (permalink / raw)
To: kernel-janitors
From: Jestin Stoffel<jestin.stoffel@gmail.com>
Replaced current->state with set_current_state to avoid a race condition
Signed-off-by: Jestin Stoffel<jestin.stoffel@gmail.com>
---
--- linux-2.6.21.1/drivers/char/n_r3964.c.orig 2007-04-29 04:17:08.000000000 -0500
+++ linux-2.6.21.1/drivers/char/n_r3964.c 2007-04-29 04:26:29.000000000 -0500
@@ -1088,7 +1088,7 @@ static ssize_t r3964_read(struct tty_str
/* block until there is a message: */
add_wait_queue(&pInfo->read_wait, &wait);
repeat:
- current->state = TASK_INTERRUPTIBLE;
+ set_current_state(TASK_INTERRUPTIBLE);
pMsg = remove_msg(pInfo, pClient);
if (!pMsg && !signal_pending(current)) {
schedule();
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.linux-foundation.org
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-04-30 17:48 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-04-30 17:48 [KJ] [PATCH] Replacing current->state with set_current_state Jestin Stoffel
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.