|
|
9a499a |
autofs-5.1.7 - fix lookup_prune_one_cache() refactoring change
|
|
|
9a499a |
|
|
|
9a499a |
From: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
|
|
|
9a499a |
Commit 256963d6b (autofs-5.1.7 - refactor lookup_prune_one_cache() a bit)
|
|
|
9a499a |
changed the position of the getting the next enumeration map entry but
|
|
|
9a499a |
failed to update a couple of other locations that assume the next map
|
|
|
9a499a |
entry has been set. Under certain fairly common conditions this leads
|
|
|
9a499a |
to an infinite loop.
|
|
|
9a499a |
|
|
|
9a499a |
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
|
9a499a |
---
|
|
|
9a499a |
CHANGELOG | 1 +
|
|
|
9a499a |
daemon/lookup.c | 5 ++++-
|
|
|
9a499a |
2 files changed, 5 insertions(+), 1 deletion(-)
|
|
|
9a499a |
|
|
|
9a499a |
--- autofs-5.1.4.orig/CHANGELOG
|
|
|
9a499a |
+++ autofs-5.1.4/CHANGELOG
|
|
|
9a499a |
@@ -73,6 +73,7 @@
|
|
|
9a499a |
- eliminate redundant cache lookup in tree_mapent_add_node().
|
|
|
9a499a |
- fix hosts map offset order.
|
|
|
9a499a |
- fix direct mount deadlock.
|
|
|
9a499a |
+- fix lookup_prune_one_cache() refactoring change.
|
|
|
9a499a |
|
|
|
9a499a |
xx/xx/2018 autofs-5.1.5
|
|
|
9a499a |
- fix flag file permission.
|
|
|
9a499a |
--- autofs-5.1.4.orig/daemon/lookup.c
|
|
|
9a499a |
+++ autofs-5.1.4/daemon/lookup.c
|
|
|
9a499a |
@@ -1387,6 +1387,7 @@ void lookup_prune_one_cache(struct autof
|
|
|
9a499a |
if (!key || strchr(key, '*')) {
|
|
|
9a499a |
if (key)
|
|
|
9a499a |
free(key);
|
|
|
9a499a |
+ me = cache_enumerate(mc, me);
|
|
|
9a499a |
continue;
|
|
|
9a499a |
}
|
|
|
9a499a |
|
|
|
9a499a |
@@ -1394,6 +1395,7 @@ void lookup_prune_one_cache(struct autof
|
|
|
9a499a |
if (!path) {
|
|
|
9a499a |
warn(ap->logopt, "can't malloc storage for path");
|
|
|
9a499a |
free(key);
|
|
|
9a499a |
+ me = cache_enumerate(mc, me);
|
|
|
9a499a |
continue;
|
|
|
9a499a |
}
|
|
|
9a499a |
|
|
|
9a499a |
@@ -1421,9 +1423,10 @@ void lookup_prune_one_cache(struct autof
|
|
|
9a499a |
}
|
|
|
9a499a |
if (!valid &&
|
|
|
9a499a |
is_mounted(path, MNTS_REAL)) {
|
|
|
9a499a |
- debug(ap->logopt, "prune posponed, %s mounted", path);
|
|
|
9a499a |
+ debug(ap->logopt, "prune postponed, %s mounted", path);
|
|
|
9a499a |
free(key);
|
|
|
9a499a |
free(path);
|
|
|
9a499a |
+ me = cache_enumerate(mc, me);
|
|
|
9a499a |
continue;
|
|
|
9a499a |
}
|
|
|
9a499a |
if (valid)
|