Bug 173194 - race condition when expiring ghosted autofs mounts
race condition when expiring ghosted autofs mounts
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kernel (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jeff Moyer
Brian Brock
Depends On:
Blocks: 168429
  Show dependency treegraph
Reported: 2005-11-14 16:11 EST by Jeff Moyer
Modified: 2007-11-30 17:07 EST (History)
1 user (show)

See Also:
Fixed In Version: RHSA-2006-0132
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-03-07 15:47:28 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2005:808 normal SHIPPED_LIVE Important: kernel security update 2005-10-27 00:00:00 EDT
Red Hat Product Errata RHSA-2006:0132 qe-ready SHIPPED_LIVE Moderate: Updated kernel packages available for Red Hat Enterprise Linux 4 Update 3 2006-03-09 11:31:00 EST

  None (edit)
Description Jeff Moyer 2005-11-14 16:11:51 EST
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050719 Red Hat/1.0.6-1.4.1 Firefox/1.0.6

Description of problem:
For browsable autofs maps, a mount request that arrives at the same time 
an expire is happening can fail to perform the needed mount.

This happens becuase the directory exists and so the revalidate succeeds 
when we need it to fail so that lookup is called on the same dentry to do 
the mount. Instead lookup is called on the next path component which 
should be whithin the mount, but the parent isn't mounted. 

The solution is to allow the revalidate to continue and perform the mount 
as no directory creation (at mount time) is needed for browsable mount 

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
I put together the following reproducer for this:

/multi	/etc/auto.multi --timeout=4 --ghost

and auto.multi contains
dir     /       segfault:/export/multi \
        /foo    segfault:/export/multi/thefoodir

Then, I simply run the following script:

while true;
	cat /segfault/multi/foo/bar > /dev/null
	if [ $? -ne 0 ]; then
		echo "Failed!"
		exit 1
	sleep 4

Once we get a mount request at the same time as a pending expiry, we will
trigger this bug.  In my testing, this typically occurs withing the first 3
iterations of the loop.

Additional info:
Comment 2 Linda Wang 2005-11-23 12:17:01 EST
committed in -22.25
Comment 6 Red Hat Bugzilla 2006-03-07 15:47:28 EST
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


Note You need to log in before you can comment on or make changes to this bug.