Hello community, here is the log from the commit of package autofs for openSUSE:Factory checked in at 2012-06-01 22:30:12 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/autofs (Old) and /work/SRC/openSUSE:Factory/.autofs.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "autofs", Maintainer is "mszer...@suse.com" Changes: -------- --- /work/SRC/openSUSE:Factory/autofs/autofs.changes 2012-05-08 11:14:12.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.autofs.new/autofs.changes 2012-06-01 22:30:20.000000000 +0200 @@ -1,0 +2,31 @@ +Tue May 29 17:12:43 UTC 2012 - lchiqui...@suse.com + +- fix umount recovery of busy direct mounts (bnc#734924) +- fix remount deadlock that can happen on a restart when there are + nested direct mounts busy (bnc#733479) + +------------------------------------------------------------------- +Mon May 28 21:12:46 UTC 2012 - lchiqui...@suse.com + +- revert "fix libtirpc name clash": auth_put() is not yet available + in our version of tirpc + +------------------------------------------------------------------- +Sat May 26 12:08:26 UTC 2012 - lchiqui...@suse.com + +- update 5.0.6 upstream patches to 20120525, fixing some bugs: + * fix sss wildcard match + * fix dlopen() error handling in sss module + * fix configure string length tests + * report "map not read" when debug logging + * duplicate parent options for included maps (bnc#753693) + * update ->timeout() function to not return timeout + * move timeout to map_source + * fix kernel verion check of version components + * dont retry ldap connect if not required + * fix initialization in rpc create_client() + * fix libtirpc name clash +- remove patches that are now upstream: + * autofs-5.0.6-duplicate-parent-options-for-included-maps.patch + +------------------------------------------------------------------- Old: ---- autofs-5.0.6-duplicate-parent-options-for-included-maps.patch autofs-5.0.6-upstream-patches-20120402.bz2 New: ---- autofs-5.0.6-fix-remount-deadlock.patch autofs-5.0.6-fix-umount-recovery-of-busy-direct-mount.patch autofs-5.0.6-revert-fix-libtirpc-name-clash.patch autofs-5.0.6-upstream-patches-20120525.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ autofs.spec ++++++ --- /var/tmp/diff_new_pack.25rWOs/_old 2012-06-01 22:30:22.000000000 +0200 +++ /var/tmp/diff_new_pack.25rWOs/_new 2012-06-01 22:30:22.000000000 +0200 @@ -53,12 +53,14 @@ Source7: NetworkManager-autofs Source8: get-upstream-patches # Upstream patches that will be in the next release -%define patchdate 20120402 +%define patchdate 20120525 Patch0: autofs-%{version}-upstream-patches-%{patchdate}.bz2 +Patch1: autofs-5.0.6-revert-fix-libtirpc-name-clash.patch +Patch2: autofs-5.0.6-fix-remount-deadlock.patch +Patch3: autofs-5.0.6-fix-umount-recovery-of-busy-direct-mount.patch # Patches submitted upstream but not yet accepted Patch80: autofs-5.0.6-invalid-ghost-dirs.patch Patch82: autofs-5.0.6-task-use-after-free.patch -Patch83: autofs-5.0.6-duplicate-parent-options-for-included-maps.patch # SUSE specific patches Patch100: autofs-suse-auto_master_default.patch Patch101: autofs-suse-build.patch @@ -83,9 +85,11 @@ cp %{SOURCE5} . # %patch0 -p1 +%patch1 -p1 +%patch2 -p1 +%patch3 -p1 %patch80 -p1 %patch82 -p1 -%patch83 -p1 %patch100 -p1 %patch101 -p1 ++++++ autofs-5.0.6-fix-remount-deadlock.patch ++++++ autofs-5.0.6 - fix remount deadlock From: Ian Kent <ra...@themaw.net> When reconstructing the mount tree upon restart a writelock to the map entry cache cannot be taken when parsing a direct map entry because a readlock is already held higher up in the call tree. In the place this is done it isn't be necessary to alter the direct map entries in the cache. Also, it shouldn't be necessary to delete existing multi-mount cache entries to avoid a duplicate multi-mount entry error return. The check for a duplicate can be done in the cache handling functions. --- lib/cache.c | 8 ++++--- modules/parse_sun.c | 60 ++++++++++++++++++++++++++------------------------- 2 files changed, 35 insertions(+), 33 deletions(-) Index: autofs-5.0.6/lib/cache.c =================================================================== --- autofs-5.0.6.orig/lib/cache.c +++ autofs-5.0.6/lib/cache.c @@ -658,10 +658,12 @@ int cache_add_offset(struct mapent_cache return CHE_FAIL; me = cache_lookup_distinct(mc, key); - if (me && me != owner) - return CHE_DUPLICATE; + if (me && me->age == age) { + if (me != owner) + return CHE_DUPLICATE; + } - ret = cache_add(mc, owner->source, key, mapent, age); + ret = cache_update(mc, owner->source, key, mapent, age); if (ret == CHE_FAIL) { warn(logopt, "failed to add key %s to cache", key); return CHE_FAIL; Index: autofs-5.0.6/modules/parse_sun.c =================================================================== --- autofs-5.0.6.orig/modules/parse_sun.c +++ autofs-5.0.6/modules/parse_sun.c @@ -843,12 +843,17 @@ add_offset_entry(struct autofs_point *ap strcpy(m_mapent, loc); ret = cache_add_offset(mc, name, m_key, m_mapent, age); - if (ret == CHE_OK) + if (ret == CHE_DUPLICATE) + warn(ap->logopt, MODPREFIX + "syntax error or duplicate offset %s -> %s", path, loc); + else if (ret == CHE_FAIL) + debug(ap->logopt, MODPREFIX + "failed to add multi-mount offset %s -> %s", path, m_mapent); + else { + ret = CHE_OK; debug(ap->logopt, MODPREFIX "added multi-mount offset %s -> %s", path, m_mapent); - else - warn(ap->logopt, MODPREFIX - "syntax error or duplicate offset %s -> %s", path, loc); + } return ret; } @@ -1410,7 +1415,7 @@ int parse_mount(struct autofs_point *ap, char buf[MAX_ERR_BUF]; struct map_source *source; struct mapent_cache *mc; - struct mapent *me = NULL; + struct mapent *me; char *pmapent, *options; const char *p; int mapent_len, rv = 0; @@ -1561,33 +1566,28 @@ int parse_mount(struct autofs_point *ap, strcat(m_root, name); } - cache_writelock(mc); - me = cache_lookup_distinct(mc, name); - if (!me) { - int ret; - /* - * Not in the cache, perhaps it's a program map - * or one that doesn't support enumeration - */ - ret = cache_add(mc, source, name, mapent, time(NULL)); - if (ret == CHE_FAIL) { - cache_unlock(mc); - free(options); - return 1; + /* + * Can't take the write lock for direct mount entries here + * but they should always be present in the map entry cache. + */ + if (ap->type == LKP_INDIRECT) { + cache_writelock(mc); + me = cache_lookup_distinct(mc, name); + if (!me) { + int ret; + /* + * Not in the cache, perhaps it's a program map + * or one that doesn't support enumeration. + */ + ret = cache_add(mc, source, name, mapent, age); + if (ret == CHE_FAIL) { + cache_unlock(mc); + free(options); + return 1; + } } - } else { - /* - * If the entry exists it must not have any existing - * multi-mount subordinate entries since we are - * mounting this afresh. We need to do this to allow - * us to fail on the check for duplicate offsets in - * we don't know when submounts go away. - */ - cache_multi_writelock(me); - cache_delete_offset_list(mc, name); - cache_multi_unlock(me); + cache_unlock(mc); } - cache_unlock(mc); cache_readlock(mc); me = cache_lookup_distinct(mc, name); ++++++ autofs-5.0.6-fix-umount-recovery-of-busy-direct-mount.patch ++++++ autofs-5.0.6 - fix umount recovery of busy direct mount From: Ian Kent <ra...@themaw.net> Reported by Leonardo Chiquitto (along with a problem analysis that lead to the resolution). Thanks for the effort Leonardo. When umounting direct mounts at exit, if any are busy and contain offset trigger mounts automount will try and re-mount them when the umount fails so they can be used to re-construct the mount tree at restart. But this fails because the kernel communication pipe, which is used as a parameter when mounting the offsets, has already been closed. To fix this all we need do is delay closing the kernel pipe file handle until after the direct mounts have been umounted since this doesn't affect the in use status of the mounts. --- daemon/direct.c | 18 +++++++++--------- 1 files changed, 9 insertions(+), 9 deletions(-) Index: autofs-5.0.6/daemon/direct.c =================================================================== --- autofs-5.0.6.orig/daemon/direct.c +++ autofs-5.0.6/daemon/direct.c @@ -193,15 +193,6 @@ int umount_autofs_direct(struct autofs_p struct mnt_list *mnts; struct mapent *me, *ne; - close(ap->state_pipe[0]); - close(ap->state_pipe[1]); - if (ap->pipefd >= 0) - close(ap->pipefd); - if (ap->kpipefd >= 0) { - close(ap->kpipefd); - ap->kpipefd = -1; - } - mnts = tree_make_mnt_tree(_PROC_MOUNTS, "/"); pthread_cleanup_push(mnts_cleanup, mnts); nc = ap->entry->master->nc; @@ -231,6 +222,15 @@ int umount_autofs_direct(struct autofs_p pthread_cleanup_pop(1); pthread_cleanup_pop(1); + close(ap->state_pipe[0]); + close(ap->state_pipe[1]); + if (ap->pipefd >= 0) + close(ap->pipefd); + if (ap->kpipefd >= 0) { + close(ap->kpipefd); + ap->kpipefd = -1; + } + return 0; } ++++++ autofs-5.0.6-invalid-ghost-dirs.patch ++++++ --- /var/tmp/diff_new_pack.25rWOs/_old 2012-06-01 22:30:22.000000000 +0200 +++ /var/tmp/diff_new_pack.25rWOs/_new 2012-06-01 22:30:22.000000000 +0200 @@ -15,7 +15,7 @@ =================================================================== --- autofs-5.0.6.orig/daemon/lookup.c +++ autofs-5.0.6/daemon/lookup.c -@@ -606,6 +606,9 @@ int lookup_ghost(struct autofs_point *ap +@@ -607,6 +607,9 @@ int lookup_ghost(struct autofs_point *ap if (!strcmp(me->key, "*")) goto next; ++++++ autofs-5.0.6-revert-fix-libtirpc-name-clash.patch ++++++ autofs-5.0.6 - fix libtirpc name clash From: Ian Kent <ik...@redhat.com> The tirpc function auth_destroy() is a macro definition in tirpc/rpc/auth.h which includes an unconditional call to a function log_debug() which clashes with an autofs function of the same name and has a different call signature. To fix it redefine auth_destroy() and exclude the debug log call. --- CHANGELOG | 1 + lib/rpc_subs.c | 10 ++++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) Index: autofs-5.0.6/CHANGELOG =================================================================== --- autofs-5.0.6.orig/CHANGELOG +++ autofs-5.0.6/CHANGELOG @@ -51,7 +51,6 @@ - fix kernel verion check of version components. - dont retry ldap connect if not required. - fix initialization in rpc create_client(). -- fix libtirpc name clash. 28/06/2011 autofs-5.0.6 ----------------------- Index: autofs-5.0.6/lib/rpc_subs.c =================================================================== --- autofs-5.0.6.orig/lib/rpc_subs.c +++ autofs-5.0.6/lib/rpc_subs.c @@ -34,16 +34,6 @@ #include <pthread.h> #include <poll.h> -#ifdef WITH_LIBTIRPC -#undef auth_destroy -#define auth_destroy(auth) \ - do { \ - int refs; \ - if ((refs = auth_put((auth))) == 0) \ - ((*((auth)->ah_ops->ah_destroy))(auth));\ - } while (0) -#endif - #include "mount.h" #include "rpc_subs.h" #include "automount.h" ++++++ autofs-5.0.6-task-use-after-free.patch ++++++ --- /var/tmp/diff_new_pack.25rWOs/_old 2012-06-01 22:30:22.000000000 +0200 +++ /var/tmp/diff_new_pack.25rWOs/_new 2012-06-01 22:30:22.000000000 +0200 @@ -6,7 +6,7 @@ =================================================================== --- autofs-5.0.6.orig/daemon/state.c +++ autofs-5.0.6/daemon/state.c -@@ -1150,12 +1150,12 @@ remove: +@@ -1166,12 +1166,12 @@ remove: struct state_queue, pending); list_del(&task->list); -- To unsubscribe, e-mail: opensuse-commit+unsubscr...@opensuse.org For additional commands, e-mail: opensuse-commit+h...@opensuse.org