[patch] sleep_on() done with cli() in the NFS code, 2.2.2

Ingo Molnar (mingo@chiara.csoma.elte.hu)
Tue, 2 Mar 1999 10:30:27 +0100 (CET)


there is one more place i found that does sleep_on() with cli(), this can
lead to lockups under SMP. Are there any unsolved reports of lockups for
NFS + SMP-2.2.2?

-- mingo

--- linux/net/sunrpc/sched.c.orig Tue Mar 2 09:53:53 1999
+++ linux/net/sunrpc/sched.c Tue Mar 2 09:55:16 1999
@@ -447,7 +447,9 @@
task->tk_pid);
if (current->pid == rpciod_pid)
printk(KERN_ERR "RPC: rpciod waiting on sync task!\n");
+ sti();
sleep_on(&task->tk_wait);
+ cli();

/*
* When the task received a signal, remove from
@@ -847,7 +849,9 @@

if (!schedq.task) {
dprintk("RPC: rpciod back to sleep\n");
+ sti();
interruptible_sleep_on(&rpciod_idle);
+ cli();
dprintk("RPC: switch to rpciod\n");
rpciod_tcp_dispatcher();
rounds = 0;

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