Skip to contentSkip to conversation

make lockd and rpciod drop locks on exit

PATCH New Robert Love 1 participant 1 message Aug 26, 2002

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

PATCH 1/1 make lockd and rpciod drop locks on exit

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

fs/lockd/svc.c +1 -0
diff -urN linux-2.5.31/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.31/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;
 }