[PATCH] make lockd and rpciod drop locks on exit

From: Robert Love (rml@tech9.net)
Date: Mon Aug 26 2002 - 15:06:20 EST


Linus,

Neither lockd nor rpciod properly drop the BKL on exit.

Yes, the BKL is automatically relinquished on schedule but the failure
to drop the lock throws off the atomic accounting.

This makes them play fair. Please, apply.

        Robert Love

diff -urN linux-2.5.31/fs/lockd/svc.c linux/fs/lockd/svc.c
--- linux-2.5.31/fs/lockd/svc.c Sat Aug 10 21:41:42 2002
+++ linux/fs/lockd/svc.c Sat Aug 24 20:18:08 2002
@@ -203,6 +203,7 @@
         rpciod_down();
 
         /* Release module */
+ unlock_kernel();
         MOD_DEC_USE_COUNT;
 }
 
diff -urN linux-2.5.31/net/sunrpc/sched.c linux/net/sunrpc/sched.c
--- linux-2.5.31/net/sunrpc/sched.c Sat Aug 10 21:41:36 2002
+++ linux/net/sunrpc/sched.c Sat Aug 24 20:18:08 2002
@@ -1030,6 +1030,7 @@
         wake_up(assassin);
 
         dprintk("RPC: rpciod exiting\n");
+ unlock_kernel();
         MOD_DEC_USE_COUNT;
         return 0;
 }

-
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 : Sat Aug 31 2002 - 22:00:18 EST