Index: linux-2.6.9-rc2-mm2/kernel/sched.c
===================================================================
--- linux-2.6.9-rc2-mm2.orig/kernel/sched.c	2004-09-24 08:58:34.248151649 +1000
+++ linux-2.6.9-rc2-mm2/kernel/sched.c	2004-09-24 08:59:33.644847111 +1000
@@ -2038,11 +2038,12 @@ static void time_slice_expiry_fn(unsigne
 		return;
 	}
 	rq = task_rq_lock(p, &flags);
-	if (unlikely(rq->task_expires > jiffies || !rq->task_expires))
-		/*
-		 * May have changed before we got the rq lock
-		 */
-		 goto out_unlock;
+	if (unlikely(rq->task_expires > jiffies || !rq->task_expires ||
+		p == rq->idle))
+			/*
+			 * May have changed before we got the rq lock
+			 */
+			 goto out_unlock;
 	if (!US_TO_JIFFIES(p->slice))
 		slice_expired(p, rq);
 	else
