Re: BUG REPORT: NFS/SMP file corruption

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Tue Feb 01 2000 - 14:09:06 EST


I've only today discovered a bug in the SunRPC that might cause this
sort of problem.

Basically, the current setup allows an rpc_task to exit while it is
still asleep on a queue. If happens to get woken up by an interrupt
while exiting, then you're liable to corrupt the rpc task queues...

Cheers,
  Trond

--- linux-2.2.14/net/sunrpc/sched.c.orig Fri May 7 20:19:11 1999
+++ linux-2.2.14/net/sunrpc/sched.c Tue Feb 1 19:58:39 2000
@@ -413,18 +413,15 @@
                 }
 
                 /*
- * No handler for next step means exit.
- */
- if (!task->tk_action)
- break;
-
- /*
                  * Perform the next FSM step.
                  * tk_action may be NULL when the task has been killed
                  * by someone else.
                  */
- if (RPC_IS_RUNNING(task) && task->tk_action)
+ if (RPC_IS_RUNNING(task)) {
+ if (!task->tk_action)
+ break;
                         task->tk_action(task);
+ }
 
                 /*
                  * Check whether task is sleeping.

-
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/



This archive was generated by hypermail 2b29 : Mon Feb 07 2000 - 21:00:06 EST