Commit Graph

1 Commits

Author SHA1 Message Date
Ian Kent 5a4722cbbe Fix a SEGV that occurs during a restart when remounting already mounted
mounts.

Jira: https://issues.redhat.com/browse/RHEL-18035

In commit 635b90ecc (autofs-5.1.8 - fix mount tree startup reconnect)
when getting the parent the check for a multi-mount should include a
check for the root of the multi-mount as well since the root does not
set the parent.

There's also a possible deadlock when re-connecting to existing direct
mounts. If we're starting up or trying to re-connect to an existing
direct mount we could be iterating through the map entries with the
readlock held so we can't just take the writelock for direct mounts.
But when trying to re-connect to an existing mount at startup there
won't be any other process updating the map entry cache.

Signed-off-by: Ian Kent <ikent@redhat.com>
2023-12-19 11:30:21 +08:00