autofs-5.1.8 - don't close lookup at umount From: Ian Kent Since map sources are reference counted they persist beyond autofs submounts. Now the map source moudule lookup gets closed at submount umount and if we are unlucky enough to be using the same map in other submounts and a lookup is underway at the time of the umount a crash can occur. To resolve this it's much better to just not close the lookup at submount umount and rely on the map source free to close the module lookup and instances when the map source is no longer referenced. Signed-off-by: Ian Kent --- CHANGELOG | 1 + daemon/automount.c | 7 ------- 2 files changed, 1 insertion(+), 7 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 9b6f1737..5f7e39bd 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -57,6 +57,7 @@ - don't immediately call function when waiting. - define LDAP_DEPRECATED during LDAP configure check. - fix return status of mount_autofs(). +- don't close lookup at umount. 19/10/2021 autofs-5.1.8 - add xdr_exports(). diff --git a/daemon/automount.c b/daemon/automount.c index f66f00e5..67fdd8ab 100644 --- a/daemon/automount.c +++ b/daemon/automount.c @@ -752,13 +752,6 @@ static int umount_autofs(struct autofs_point *ap, const char *root) if (ap->state == ST_INIT) return -1; - /* - * Since lookup.c is lazy about closing lookup modules - * to prevent unneeded opens, we need to clean them up - * before umount. - */ - lookup_close_lookup(ap); - if (ap->type == LKP_INDIRECT) { umount_all(ap); ret = umount_autofs_indirect(ap, root);