da0ee4c338
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2056320 Changes to resolve internal hosts map problem: - fix root offset error handling. - fix nonstrict fail handling of last offset mount. - dont fail on duplicate offset entry tree add. - fix loop under run in cache_get_offset_parent(). - simplify cache_add() a little. - fix use after free in tree_mapent_delete_offset_tree(). - fix memory leak in xdr_exports(). - avoid calling pthread_getspecific() with NULL key_thread_attempt_id. - fix sysconf(3) return handling. - remove rpcgen dependedncy, it hasn't been needed since rev 10. Resolves: rhbz#2056320 Signed-off-by: Ian Kent ikent@redhat.com
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
autofs-5.1.8 - simplify cache_add() a little
|
|
|
|
From: Ian Kent <raven@themaw.net>
|
|
|
|
If a map entry is being added to an existing hash chain there's an
|
|
unneccessarily complicted setting of ->next of the last entry.
|
|
|
|
Just initialize the map entry ->next field instead and remove the
|
|
confusing assignment.
|
|
|
|
Signed-off-by: Ian Kent <raven@themaw.net>
|
|
---
|
|
CHANGELOG | 1 +
|
|
lib/cache.c | 2 +-
|
|
2 files changed, 2 insertions(+), 1 deletion(-)
|
|
|
|
--- autofs-5.1.7.orig/CHANGELOG
|
|
+++ autofs-5.1.7/CHANGELOG
|
|
@@ -89,6 +89,7 @@
|
|
- fix nonstrict fail handling of last offset mount.
|
|
- dont fail on duplicate offset entry tree add.
|
|
- fix loop under run in cache_get_offset_parent().
|
|
+- simplify cache_add() a little.
|
|
|
|
25/01/2021 autofs-5.1.7
|
|
- make bind mounts propagation slave by default.
|
|
--- autofs-5.1.7.orig/lib/cache.c
|
|
+++ autofs-5.1.7/lib/cache.c
|
|
@@ -564,6 +564,7 @@ int cache_add(struct mapent_cache *mc, s
|
|
me->dev = (dev_t) -1;
|
|
me->ino = (ino_t) -1;
|
|
me->flags = 0;
|
|
+ me->next = NULL;
|
|
|
|
/*
|
|
* We need to add to the end if values exist in order to
|
|
@@ -583,7 +584,6 @@ int cache_add(struct mapent_cache *mc, s
|
|
|
|
existing = next;
|
|
}
|
|
- me->next = existing->next;
|
|
existing->next = me;
|
|
}
|
|
return CHE_OK;
|