patch-1.3.84 linux/kernel/sched.c

Next file: linux/mm/kmalloc.c
Previous file: linux/include/linux/skbuff.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.83/linux/kernel/sched.c linux/kernel/sched.c
@@ -179,11 +179,15 @@
 	struct task_struct *next = p->next_run;
 	struct task_struct *prev = p->prev_run;
 
+	/* remove from list */
 	next->prev_run = prev;
 	prev->next_run = next;
-	(p->prev_run = init_task.prev_run)->next_run = p;
+	/* add back to list */
 	p->next_run = &init_task;
+	prev = init_task.prev_run;
 	init_task.prev_run = p;
+	p->prev_run = prev;
+	prev->next_run = p;
 }
 
 /*

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this