]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: Avoid triggering autofs in lookup_umount_fs_by_statfs
authorFabian Vogt <fvogt@suse.de>
Wed, 1 Apr 2020 11:15:13 +0000 (13:15 +0200)
committerFabian Vogt <fvogt@suse.de>
Wed, 1 Apr 2020 11:34:43 +0000 (13:34 +0200)
commit7065cc0e5312cafc5ae3e4c342f78f264300fb5f
tree96b5f783752d598839b9219c3cde1601351c3ff1
parentbee464006776203a8cb545a35c86234181c7a55a
libmount: Avoid triggering autofs in lookup_umount_fs_by_statfs

Currently, umount /foo results in a statfs("/foo") call, which triggers
autofs. This can create another mountpoint on /foo, which is then unmounted
later instead of the actual /foo at the time umount was called.

This is especially an issue for umount -R /bar, which just fails with
-EBUSY as the accidental mountpoint is never accounted for and so it tries
to umount /bar before /bar/someautofs.

Replace the direct statfs call with open(path, O_PATH) + fstatfs, which sees
the autofs mount directly, without triggering it.
libmount/src/context_umount.c