36 lines
1.2 KiB
Diff
36 lines
1.2 KiB
Diff
am-utils-6.1.5 - dont background autofs umount
|
|
|
|
From: Ian Kent <ikent@redhat.com>
|
|
|
|
When using an autofs multi-level mount map amd can fail to umount
|
|
NFS leaf mounts causing shutdown to fail. It also can cause amd to
|
|
SEGV because, even though umounts fail, the autofs mount control
|
|
structure is freed and a later umount attempt doesn't check if this
|
|
struct is valid before using it.
|
|
|
|
The cause of the umount failure appears to be the background umount
|
|
of NFS mounts at the leaf of the tree not finishing before the autofs
|
|
file system mounts above are attempted.
|
|
|
|
It isn't worth adding a patch to check if the autofs mount control
|
|
structure is valid because if it isn't, in this case, amd doesn't
|
|
crash but still becomes unresponsive.
|
|
---
|
|
amd/map.c | 3 ++-
|
|
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/amd/map.c b/amd/map.c
|
|
index 2fad4b7..8e86b39 100644
|
|
--- a/amd/map.c
|
|
+++ b/amd/map.c
|
|
@@ -946,7 +946,8 @@ unmount_mp(am_node *mp)
|
|
#endif /* HAVE_FS_AUTOFS */
|
|
|
|
if ((mf->mf_fsflags & FS_UBACKGROUND) &&
|
|
- (mf->mf_flags & MFF_MOUNTED)) {
|
|
+ (mf->mf_flags & MFF_MOUNTED) &&
|
|
+ !(mf->mf_flags & MFF_ON_AUTOFS)) {
|
|
dlog("Trying unmount in background");
|
|
run_task(unmount_node, (opaque_t) mp,
|
|
free_map_if_success, (opaque_t) mp);
|