automount: ack automount requests even when already mounted (#5916)
authorAnchor Cat <githubanchorcat@anchor.net.au>
Wed, 10 May 2017 11:23:58 +0000 (21:23 +1000)
committerLennart Poettering <lennart@poettering.net>
Wed, 10 May 2017 11:23:58 +0000 (13:23 +0200)
commite7d54bf58789545a9eb0b3964233defa0b007318
tree16ea3f868474d736a86b5c8f70b859a71cde558f
parent9a4eeb4a0cf8efc1c1c87e541361bc61c60ce23a
automount: ack automount requests even when already mounted (#5916)

If a process accesses an autofs filesystem while systemd is in the
middle of starting the mount unit on top of it, it is possible for the
autofs_ptype_missing_direct request from the kernel to be received after
the mount unit has been fully started:

  systemd forks and execs mount             ...
            ...                     access autofs, blocks
  mount exits                               ...
  systemd receives SIGCHLD                  ...
            ...                     kernel sends request
  systemd receives request                  ...

systemd needs to respond to this request, otherwise the kernel will
continue to block access to the mount point.
src/core/automount.c