Ian,

I've attached an updated patch from Jeff Moyer's earlier signal race
patch which allows the SIGCHLD signal to be received in the middle of
st_expire() before ap.state can be set to ST_EXPIRE.  This causes the
signal handling function for SIG_CHLD to never run the alarm() function
which causes the SIGALRM signal to never be sent (or received) by
automount, which causes directories w/ a timeout to never be unmounted.

Thanks,
Chris
--- autofs-4.1.3/daemon/automount.c.signal-race-fix	2004-10-15 18:57:23.000000000 -0500
+++ autofs-4.1.3/daemon/automount.c	2004-10-15 18:57:59.000000000 -0500
@@ -833,10 +833,10 @@
 	alarm(0);
 
 	/* Prevent any new mounts */
-	ap.state = ST_SHUTDOWN_PENDING;
-
 	sigprocmask(SIG_SETMASK, &lock_sigs, NULL);
 
+	ap.state = ST_SHUTDOWN_PENDING;
+
 	/* Unmount everything */
 	exp = expire_proc(1);
 
@@ -904,6 +904,7 @@
 		return 1;
 
 	case EXP_STARTED:
+		sigprocmask(SIG_SETMASK, &lock_sigs, NULL);
 		ap.state = ST_EXPIRE;
 		sigprocmask(SIG_SETMASK, &ready_sigs, NULL);
 		return 0;
_______________________________________________
autofs mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/autofs

Reply via email to