lkml.org 
[lkml]   [2002]   [Jul]   [20]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH] lockd and rpciod do not correctly drop locks
FromRobert Love <>
Date20 Jul 2002 13:22:05 -0700
Linus, 

lockd and rpciod exit without properly relinquishing the locks they
hold.  This pisses off the preempt_count debugging in do_exit.

While in this case it is safe since the lock is the BKL, it is unclean
in my opinion.

I also hate seeing the debug message on unmount ;)

Patch is against 2.5.27, please apply.

        Robert Love

diff -urN linux-2.5.27/fs/lockd/svc.c linux/fs/lockd/svc.c
--- linux-2.5.27/fs/lockd/svc.c	Sat Jul 20 12:11:25 2002
+++ linux/fs/lockd/svc.c	Sat Jul 20 12:52:21 2002
@@ -203,6 +203,7 @@
 	rpciod_down();
 
 	/* Release module */
+	unlock_kernel();
 	MOD_DEC_USE_COUNT;
 }
 
diff -urN linux-2.5.27/net/sunrpc/sched.c linux/net/sunrpc/sched.c
--- linux-2.5.27/net/sunrpc/sched.c	Sat Jul 20 12:11:22 2002
+++ linux/net/sunrpc/sched.c	Sat Jul 20 12:52:21 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/

\
 
 \ /
  Last update: 2005-03-22 12:22    [W:0.050 / U:0.180 seconds]
©2003-2008 Jasper Spaans