Skip to contentSkip to conversation

lockd and rpciod do not correctly drop locks

PATCH New Robert Love 1 participant 1 message Jul 20, 2002

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lockd and rpciod do not correctly drop locks

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

fs/lockd/svc.c +1 -0
diff -urN linux-2.5.27/fs/lockd/svc.c linux/fs/lockd/svc.c
@@ -203,6 +203,7 @@
 	rpciod_down();
 
 	/* Release module */
+	unlock_kernel();
 	MOD_DEC_USE_COUNT;
 }
 
net/sunrpc/sched.c +1 -0
diff -urN linux-2.5.27/net/sunrpc/sched.c linux/net/sunrpc/sched.c
@@ -1030,6 +1030,7 @@
 	wake_up(assassin);
 
 	dprintk("RPC: rpciod exiting\n");
+	unlock_kernel();
 	MOD_DEC_USE_COUNT;
 	return 0;
 }