Re: lock order in O(1) scheduler

From: Robert Love (rml@tech9.net)
Date: Thu Jan 10 2002 - 00:49:24 EST


On Thu, 2002-01-10 at 00:29, David S. Miller wrote:

> Unlocking order doesn't matter wrt. ABBA deadlock.

Indeed. Thank you.

Anyhow, Ingo, here is a patch for the typo in set_cpus_allowed:

diff -urN linux-2.5.2-pre10/ linux/
--- linux-2.5.2-pre10/kernel/sched.c Tue Jan 8 00:26:17 2002
+++ linux/kernel/sched.c Thu Jan 10 00:41:38 2002
@@ -813,8 +813,8 @@
                 spin_lock_irq(&target_rq->lock);
                 spin_lock(&this_rq->lock);
         } else {
- spin_lock_irq(&target_rq->lock);
- spin_lock(&this_rq->lock);
+ spin_lock_irq(&this_rq->lock);
+ spin_lock(&target_rq->lock);
         }
         dequeue_task(p, p->array);
         this_rq->nr_running--;

        Robert Love

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue Jan 15 2002 - 21:00:30 EST