Skip to contentSkip to conversation

have lockd and rpciod drop locks on exit

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

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

PATCH 1/1 have 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 and results in a preempt_count warning on exit.

This makes them play fair - it does not hurt.

Patch is against 2.5.32-bk. Please, apply.

Robert Love

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