Hello community,
here is the log from the commit of package autofs for openSUSE:Factory
checked in at Thu Jan 8 17:48:07 CET 2009.
--------
--- autofs/autofs.changes 2008-10-24 18:07:06.000000000 +0200
+++ /mounts/work_src_done/STABLE/autofs/autofs.changes 2009-01-08 14:34:49.000000000 +0100
@@ -1,0 +2,5 @@
+Thu Jan 8 14:33:41 CET 2009 - mkoenig@suse.de
+
+- fix segfault on HUP [bnc#458336]
+
+-------------------------------------------------------------------
calling whatdependson for head-i586
New:
----
autofs-5.0.3-expire-thread-create-cond-handling.patch
autofs-5.0.3-library-reload-fix.patch
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ autofs.spec ++++++
--- /var/tmp/diff_new_pack.RGf653/_old 2009-01-08 17:46:59.000000000 +0100
+++ /var/tmp/diff_new_pack.RGf653/_new 2009-01-08 17:46:59.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package autofs (Version 5.0.3)
#
-# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -25,7 +25,7 @@
Group: System/Daemons
AutoReqProv: on
Version: 5.0.3
-Release: 82
+Release: 83
Summary: A Kernel-Based Automounter
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/%{name}-%{version}.tar.bz2
@@ -35,6 +35,9 @@
Source5: README.SuSE
Source7: NetworkManager-autofs
Patch0: autofs-5.0.3-upstream-patches-20080806.bz2
+Patch1: autofs-5.0.3-library-reload-fix.patch
+Patch2: autofs-5.0.3-expire-thread-create-cond-handling.patch
+#
Patch10: autofs-suse-auto_master_default.patch
Patch11: autofs-suse-autofs_init.patch
Patch12: autofs-5.0.1-mount_xdr_no_strict_aliasing.patch
@@ -66,6 +69,8 @@
cp %{SOURCE5} .
#
%patch0 -p1
+%patch1 -p1
+%patch2 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
@@ -155,6 +160,8 @@
/usr/sbin/automount
%changelog
+* Thu Jan 08 2009 mkoenig@suse.de
+- fix segfault on HUP [bnc#458336]
* Fri Oct 24 2008 mkoenig@suse.de
- fix syntax error in init script [bnc#435505]
* Fri Aug 15 2008 mkoenig@suse.de
@@ -327,7 +334,7 @@
- Rename from autofs4 to autofs
* Tue Jun 14 2005 kukuk@suse.de
- Remove broken "singnal-race" patch [#90521]
-* Mon May 23 2005 ro@suse.de
+* Sun May 22 2005 ro@suse.de
- update to 4.1.4, remove upstream patches
* Sun May 15 2005 aj@suse.de
- Initialize variables.
@@ -339,7 +346,7 @@
- use our good old init script (bug #67311)
* Fri Mar 04 2005 arvin@suse.de
- fixed syntax of sysconfig.autofs (bug #70883)
-* Sat Feb 26 2005 mmj@suse.de
+* Fri Feb 25 2005 mmj@suse.de
- LSB says return value for not running service is 7 [#65817]
* Thu Dec 09 2004 ihno@suse.de
- Update to version 4.1.3 plus patches
@@ -402,7 +409,7 @@
* Mon Feb 25 2002 arvin@suse.de
- added option expire to init script (unmount all currently
not used mounts)
-* Sun Feb 17 2002 arvin@suse.de
+* Sat Feb 16 2002 arvin@suse.de
- fixed start/stop message
* Fri Feb 15 2002 arvin@suse.de
- simplify remove_and_set call
@@ -484,7 +491,7 @@
- new version 4.0.0pre9
* Tue Oct 24 2000 arvin@suse.de
- new version 4.0.0pre8
-* Tue Oct 24 2000 bk@suse.de
+* Mon Oct 23 2000 bk@suse.de
- remove the annoying dequote debug message(filled the logs without errors)
* Mon Oct 16 2000 ro@suse.de
- showmount does no longer have the k-prefix
@@ -499,7 +506,7 @@
- fixed rcautofs (some lines in status were truncated)
* Tue Sep 19 2000 arvin@suse.de
- fixed bug #3842 (wrong option to mount; was actually random data)
-* Wed Aug 23 2000 ro@suse.de
+* Tue Aug 22 2000 ro@suse.de
- changed neededforbuild: knfsd -> nfsutils
* Thu Jul 06 2000 kukuk@suse.de
- Fix path to showmount in /etc/auto.net
@@ -519,7 +526,7 @@
- Add /etc/auto.net (needs new autofs kernel module)
* Fri Nov 05 1999 rolf@suse.de
- added flag to switch NIS usage for maps [BUG#1074]
-* Tue Oct 26 1999 ro@suse.de
+* Mon Oct 25 1999 ro@suse.de
- specfile-fix: no need for %%dir /usr/lib/autofs, if that whole tree
is packed
* Mon Oct 25 1999 rolf@suse.de
++++++ autofs-5.0.3-expire-thread-create-cond-handling.patch ++++++
autofs-5.0.3 - fix incorrect pthreads condition handling for expire requests.
From: Ian Kent
Occassionally, when starting an expire thread we can attempt to use the
structure for parameter communication after it has been freed. This patch
resolves this issue.
---
CHANGELOG | 1 +
daemon/direct.c | 40 +++++++++++++++++++++-------------------
daemon/indirect.c | 28 +++++++++++++++-------------
3 files changed, 37 insertions(+), 32 deletions(-)
Index: autofs-5.0.3/CHANGELOG
===================================================================
--- autofs-5.0.3.orig/CHANGELOG 2009-01-08 14:29:05.000000000 +0100
+++ autofs-5.0.3/CHANGELOG 2009-01-08 14:29:37.000000000 +0100
@@ -97,6 +97,7 @@
- fix add SEARCH_BASE configuration option.
- update kernel patches.
- fix segv during library re-open.
+- fix incorrect pthreads condition handling for expire requests.
18/06/2007 autofs-5.0.2
-----------------------
Index: autofs-5.0.3/daemon/direct.c
===================================================================
--- autofs-5.0.3.orig/daemon/direct.c 2009-01-08 14:29:05.000000000 +0100
+++ autofs-5.0.3/daemon/direct.c 2009-01-08 14:29:16.000000000 +0100
@@ -1033,55 +1033,53 @@ static void expire_mutex_unlock(void *ar
static void *do_expire_direct(void *arg)
{
- struct pending_args *mt;
+ struct pending_args *args, mt;
struct autofs_point *ap;
size_t len;
int status, state;
- mt = (struct pending_args *) arg;
+ args = (struct pending_args *) arg;
status = pthread_mutex_lock(&ea_mutex);
if (status)
fatal(status);
- ap = mt->ap;
+ memcpy(&mt, args, sizeof(struct pending_args));
+
+ ap = mt.ap;
- mt->signaled = 1;
- status = pthread_cond_signal(&mt->cond);
+ args->signaled = 1;
+ status = pthread_cond_signal(&args->cond);
if (status)
fatal(status);
expire_mutex_unlock(NULL);
- pthread_cleanup_push(free_pending_args, mt);
- pthread_cleanup_push(pending_cond_destroy, mt);
- pthread_cleanup_push(expire_send_fail, mt);
+ pthread_cleanup_push(expire_send_fail, &mt);
- len = _strlen(mt->name, KEY_MAX_LEN);
+ len = _strlen(mt.name, KEY_MAX_LEN);
if (!len) {
- warn(ap->logopt, "direct key path too long %s", mt->name);
+ warn(ap->logopt, "direct key path too long %s", mt.name);
/* TODO: force umount ?? */
pthread_exit(NULL);
}
- status = do_expire(ap, mt->name, len);
+ status = do_expire(ap, mt.name, len);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state);
if (status)
- send_fail(ap->logopt, mt->ioctlfd, mt->wait_queue_token);
+ send_fail(ap->logopt, mt.ioctlfd, mt.wait_queue_token);
else {
struct mapent *me;
- cache_readlock(mt->mc);
- me = cache_lookup_distinct(mt->mc, mt->name);
+ cache_readlock(mt.mc);
+ me = cache_lookup_distinct(mt.mc, mt.name);
me->ioctlfd = -1;
- cache_unlock(mt->mc);
- send_ready(ap->logopt, mt->ioctlfd, mt->wait_queue_token);
- close(mt->ioctlfd);
+ cache_unlock(mt.mc);
+ send_ready(ap->logopt, mt.ioctlfd, mt.wait_queue_token);
+ close(mt.ioctlfd);
}
pthread_setcancelstate(state, NULL);
pthread_cleanup_pop(0);
- pthread_cleanup_pop(1);
- pthread_cleanup_pop(1);
return NULL;
}
@@ -1199,6 +1197,8 @@ int handle_packet_expire_direct(struct a
cache_unlock(mc);
master_source_unlock(ap->entry);
+ pthread_cleanup_push(free_pending_args, mt);
+ pthread_cleanup_push(pending_cond_destroy, mt);
pthread_cleanup_push(expire_mutex_unlock, NULL);
pthread_setcancelstate(state, NULL);
@@ -1213,6 +1213,8 @@ int handle_packet_expire_direct(struct a
}
pthread_cleanup_pop(1);
+ pthread_cleanup_pop(1);
+ pthread_cleanup_pop(1);
return 0;
}
Index: autofs-5.0.3/daemon/indirect.c
===================================================================
--- autofs-5.0.3.orig/daemon/indirect.c 2009-01-08 14:29:05.000000000 +0100
+++ autofs-5.0.3/daemon/indirect.c 2009-01-08 14:29:16.000000000 +0100
@@ -596,40 +596,38 @@ static void expire_mutex_unlock(void *ar
static void *do_expire_indirect(void *arg)
{
- struct pending_args *mt;
+ struct pending_args *args, mt;
struct autofs_point *ap;
int status, state;
- mt = (struct pending_args *) arg;
+ args = (struct pending_args *) arg;
status = pthread_mutex_lock(&ea_mutex);
if (status)
fatal(status);
- ap = mt->ap;
+ memcpy(&mt, args, sizeof(struct pending_args));
+
+ ap = mt.ap;
- mt->signaled = 1;
- status = pthread_cond_signal(&mt->cond);
+ args->signaled = 1;
+ status = pthread_cond_signal(&args->cond);
if (status)
fatal(status);
expire_mutex_unlock(NULL);
- pthread_cleanup_push(free_pending_args, mt);
- pthread_cleanup_push(pending_cond_destroy, mt);
- pthread_cleanup_push(expire_send_fail, mt);
+ pthread_cleanup_push(expire_send_fail, &mt);
- status = do_expire(mt->ap, mt->name, mt->len);
+ status = do_expire(mt.ap, mt.name, mt.len);
pthread_setcancelstate(PTHREAD_CANCEL_DISABLE, &state);
if (status)
- send_fail(ap->logopt, ap->ioctlfd, mt->wait_queue_token);
+ send_fail(ap->logopt, ap->ioctlfd, mt.wait_queue_token);
else
- send_ready(ap->logopt, ap->ioctlfd, mt->wait_queue_token);
+ send_ready(ap->logopt, ap->ioctlfd, mt.wait_queue_token);
pthread_setcancelstate(state, NULL);
pthread_cleanup_pop(0);
- pthread_cleanup_pop(1);
- pthread_cleanup_pop(1);
return NULL;
}
@@ -682,6 +680,8 @@ int handle_packet_expire_indirect(struct
return 1;
}
+ pthread_cleanup_push(free_pending_args, mt);
+ pthread_cleanup_push(pending_cond_destroy, mt);
pthread_cleanup_push(expire_mutex_unlock, NULL);
pthread_setcancelstate(state, NULL);
@@ -696,6 +696,8 @@ int handle_packet_expire_indirect(struct
}
pthread_cleanup_pop(1);
+ pthread_cleanup_pop(1);
+ pthread_cleanup_pop(1);
return 0;
}
++++++ autofs-5.0.3-library-reload-fix.patch ++++++
autofs-5.0.3 - library reload fix
From: Ian Kent
During a map re-read autofs needs to re-open its lookup libraries but
dependent shared libraries can't handle being unloaded and then re-loaded
by the same process. This patch preventis dependent libraries from being
unloaded during this re-open.
---
CHANGELOG | 1 +
daemon/automount.c | 1 -
daemon/lookup.c | 21 +++++++++------------
daemon/state.c | 3 +++
include/master.h | 17 +++--------------
lib/master.c | 28 ++++++++++++++++++++++------
6 files changed, 38 insertions(+), 33 deletions(-)
Index: autofs-5.0.3/CHANGELOG
===================================================================
--- autofs-5.0.3.orig/CHANGELOG 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/CHANGELOG 2009-01-08 14:28:36.000000000 +0100
@@ -96,6 +96,7 @@
- fix race during sub-mount shutdown.
- fix add SEARCH_BASE configuration option.
- update kernel patches.
+- fix segv during library re-open.
18/06/2007 autofs-5.0.2
-----------------------
Index: autofs-5.0.3/daemon/automount.c
===================================================================
--- autofs-5.0.3.orig/daemon/automount.c 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/daemon/automount.c 2009-01-08 14:28:04.000000000 +0100
@@ -85,7 +85,6 @@ int aquire_flag_file(void);
void release_flag_file(void);
static int umount_all(struct autofs_point *ap, int force);
-extern pthread_mutex_t master_mutex;
extern struct master *master_list;
static int do_mkdir(const char *parent, const char *path, mode_t mode)
Index: autofs-5.0.3/daemon/lookup.c
===================================================================
--- autofs-5.0.3.orig/daemon/lookup.c 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/daemon/lookup.c 2009-01-08 14:28:04.000000000 +0100
@@ -267,17 +267,17 @@ static int do_read_map(struct autofs_poi
struct lookup_mod *lookup;
int status;
- if (!map->lookup) {
- lookup = open_lookup(map->type, "",
- map->format, map->argc, map->argv);
- if (!lookup) {
- debug(ap->logopt, "lookup module %s failed", map->type);
- return NSS_STATUS_UNAVAIL;
- }
- map->lookup = lookup;
+ lookup = open_lookup(map->type, "", map->format, map->argc, map->argv);
+ if (!lookup) {
+ debug(ap->logopt, "lookup module %s failed", map->type);
+ return NSS_STATUS_UNAVAIL;
}
- lookup = map->lookup;
+ master_source_writelock(ap->entry);
+ if (map->lookup)
+ close_lookup(map->lookup);
+ map->lookup = lookup;
+ master_source_unlock(ap->entry);
/* If we don't need to create directories then there's no use
* reading the map. We just need to test that the map is valid
@@ -463,8 +463,6 @@ int lookup_nss_read_map(struct autofs_po
* point in the master map) do the nss lookup to
* locate the map and read it.
*/
- pthread_cleanup_push(master_source_lock_cleanup, entry);
- master_source_readlock(entry);
if (source)
map = source;
else
@@ -557,7 +555,6 @@ int lookup_nss_read_map(struct autofs_po
map = map->next;
}
- pthread_cleanup_pop(1);
if (!result || at_least_one)
return 1;
Index: autofs-5.0.3/daemon/state.c
===================================================================
--- autofs-5.0.3.orig/daemon/state.c 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/daemon/state.c 2009-01-08 14:28:04.000000000 +0100
@@ -387,9 +387,12 @@ static void *do_readmap(void *arg)
info(ap->logopt, "re-reading map for %s", ap->path);
+ pthread_cleanup_push(master_mutex_lock_cleanup, NULL);
+ master_mutex_lock();
status = lookup_nss_read_map(ap, NULL, now);
if (!status)
pthread_exit(NULL);
+ pthread_cleanup_pop(1);
if (ap->type == LKP_INDIRECT) {
lookup_prune_cache(ap, now);
Index: autofs-5.0.3/include/master.h
===================================================================
--- autofs-5.0.3.orig/include/master.h 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/include/master.h 2009-01-08 14:28:04.000000000 +0100
@@ -70,6 +70,9 @@ int master_parse_entry(const char *, uns
/* From master.c master parser utility routines */
+void master_mutex_lock(void);
+void master_mutex_unlock(void);
+void master_mutex_lock_cleanup(void *);
void master_set_default_timeout(void);
void master_set_default_ghost_mode(void);
int master_add_autofs_point(struct master_mapent *, time_t, unsigned, unsigned, int);
@@ -108,18 +111,4 @@ extern inline unsigned int master_get_lo
int master_list_empty(struct master *);
int master_kill(struct master *);
-#define master_mutex_lock() \
-do { \
- int status = pthread_mutex_lock(&master_mutex); \
- if (status) \
- fatal(status); \
-} while (0)
-
-#define master_mutex_unlock() \
-do { \
- int status = pthread_mutex_unlock(&master_mutex); \
- if (status) \
- fatal(status); \
-} while (0)
-
#endif
Index: autofs-5.0.3/lib/master.c
===================================================================
--- autofs-5.0.3.orig/lib/master.c 2009-01-08 14:27:48.000000000 +0100
+++ autofs-5.0.3/lib/master.c 2009-01-08 14:28:04.000000000 +0100
@@ -41,8 +41,28 @@ static struct map_source *
__master_find_map_source(struct master_mapent *,
const char *, const char *, int, const char **);
-pthread_mutex_t master_mutex = PTHREAD_MUTEX_INITIALIZER;
-pthread_mutex_t instance_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t master_mutex = PTHREAD_MUTEX_INITIALIZER;
+static pthread_mutex_t instance_mutex = PTHREAD_MUTEX_INITIALIZER;
+
+void master_mutex_lock(void)
+{
+ int status = pthread_mutex_lock(&master_mutex);
+ if (status)
+ fatal(status);
+}
+
+void master_mutex_unlock(void)
+{
+ int status = pthread_mutex_unlock(&master_mutex);
+ if (status)
+ fatal(status);
+}
+
+void master_mutex_lock_cleanup(void *arg)
+{
+ master_mutex_unlock();
+ return;
+}
int master_add_autofs_point(struct master_mapent *entry,
time_t timeout, unsigned logopt, unsigned ghost, int submount)
@@ -1086,10 +1106,6 @@ int master_mount_mounts(struct master *m
continue;
}
- master_source_writelock(ap->entry);
- lookup_close_lookup(ap);
- master_source_unlock(ap->entry);
-
cache_readlock(nc);
ne = cache_lookup_distinct(nc, this->path);
if (ne && this->age > ne->age) {
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Remember to have fun...
--
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org