Skip to contentSkip to conversation

Replacing current->state with set_current_state

PATCH New Jestin Stoffel 1 participant 1 message Apr 30, 2007

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Replacing current->state with set_current_state

From: Jestin Stoffel<[email protected]>

Replaced current->state with set_current_state to avoid a race condition

---

drivers/char/n_r3964.c renamed from drivers/char/n_r3964.c.orig +1 -1
@@ -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
[email protected]
https://lists.linux-foundation.org/mailman/listinfo/kernel-janitors