Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 31 Aug 2014 21:51:01 +0000 (UTC)
From:      Edward Tomasz Napierala <trasz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org
Subject:   svn commit: r270899 - stable/10/sys/fs/autofs
Message-ID:  <201408312151.s7VLp1Ka088739@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: trasz
Date: Sun Aug 31 21:51:01 2014
New Revision: 270899
URL: http://svnweb.freebsd.org/changeset/base/270899

Log:
  MFC r270399:
  
  Add comment explaining one of the quirks in autofs.
  
  Sponsored by:	The FreeBSD Foundation

Modified:
  stable/10/sys/fs/autofs/autofs.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/fs/autofs/autofs.c
==============================================================================
--- stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:49:45 2014	(r270898)
+++ stable/10/sys/fs/autofs/autofs.c	Sun Aug 31 21:51:01 2014	(r270899)
@@ -595,6 +595,14 @@ autofs_open(struct cdev *dev, int flags,
 {
 
 	sx_xlock(&sc->sc_lock);
+	/*
+	 * We must never block automountd(8) and its descendants, and we use
+	 * session ID to determine that: we store session id of the process
+	 * that opened the device, and then compare it with session ids
+	 * of triggering processes.  This means running a second automountd(8)
+	 * instance would break the previous one.  The check below prevents
+	 * it from happening.
+	 */
 	if (sc->sc_dev_opened) {
 		sx_xunlock(&sc->sc_lock);
 		return (EBUSY);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408312151.s7VLp1Ka088739>