]> git.ipfire.org Git - thirdparty/systemd.git/commit
mount: disable mount-storm protection while mount unit is starting.
authorNeilBrown <neilb@suse.com>
Sun, 16 Dec 2018 22:32:58 +0000 (09:32 +1100)
committerLennart Poettering <lennart@poettering.net>
Tue, 18 Dec 2018 23:44:19 +0000 (00:44 +0100)
commitfcfb1f775ed0e9d282607bb118ba788b98952855
tree993fdf1e7b75ef615d8f5f1d3f6c2e6d4086e53a
parentff03aee4b7802190774fe7a42a239782f6a9beff
mount: disable mount-storm protection while mount unit is starting.

The starting of mount units requires that changes to
/proc/self/mountinfo be processed before the SIGCHILD from the
completion of /sbin/mount is processed, as described by the comment
  /* Note that due to the io event priority logic, we can be sure the new mountinfo is loaded
   * before we process the SIGCHLD for the mount command. */

The recently-added mount-storm protection can defeat this as it
will sometimes deliberately delay processing of /proc/self/mountinfo.

So we need to disable mount-storm protection when a mount unit is starting.
We do this by keeping a counter of the number of pending
mounts, and disabling the protection when this is non-zero.

Thanks to @asavah for finding and reporting this problem.
src/core/manager.h
src/core/mount.c