[autofs/f16] * Mon Jan 23 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-5 - fix fix wait for master source mutex. -

Ian Kent iankent at fedoraproject.org
Sun Jan 22 23:21:13 UTC 2012


commit 04b29c2ba54eb3e2f2650880792fada2002977d6
Author: Ian Kent <raven at themaw.net>
Date:   Mon Jan 23 07:20:32 2012 +0800

    * Mon Jan 23 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-5
    - fix fix wait for master source mutex.
    - fix improve mount location error reporting (bz783496).

 ....0.6-fix-fix-wait-for-master-source-mutex.patch |   30 ++++++++++++
 ...ix-improve-mount-location-error-reporting.patch |   50 ++++++++++++++++++++
 autofs.spec                                        |   10 ++++-
 3 files changed, 89 insertions(+), 1 deletions(-)
---
diff --git a/autofs-5.0.6-fix-fix-wait-for-master-source-mutex.patch b/autofs-5.0.6-fix-fix-wait-for-master-source-mutex.patch
new file mode 100644
index 0000000..9e6d74c
--- /dev/null
+++ b/autofs-5.0.6-fix-fix-wait-for-master-source-mutex.patch
@@ -0,0 +1,30 @@
+autofs-5.0.6 - fix fix wait for master source mutex
+
+From: Ian Kent <raven at themaw.net>
+
+The "wait for master source mutex" change wait for a busy read/write
+mutex to become available instead of failing. The s390x architecture
+is slower than the Intel architectures and the time allowed to wait
+can be too short leading to a failure anyway.
+
+This patch increases the maximum wait from 1 second to 5 seconds to
+avoid false positive fails.
+---
+
+ lib/master.c |    2 +-
+ 1 files changed, 1 insertions(+), 1 deletions(-)
+
+
+diff --git a/lib/master.c b/lib/master.c
+index 87d1269..aad9087 100644
+--- a/lib/master.c
++++ b/lib/master.c
+@@ -552,7 +552,7 @@ void master_source_writelock(struct master_mapent *entry)
+ 
+ void master_source_readlock(struct master_mapent *entry)
+ {
+-	int retries = 5; /* 1 second maximum */
++	int retries = 25; /* 5 second maximum */
+ 	int status;
+ 
+ 	while (retries--) {
diff --git a/autofs-5.0.6-fix-improve-mount-location-error-reporting.patch b/autofs-5.0.6-fix-improve-mount-location-error-reporting.patch
new file mode 100644
index 0000000..4e58b9e
--- /dev/null
+++ b/autofs-5.0.6-fix-improve-mount-location-error-reporting.patch
@@ -0,0 +1,50 @@
+autofs-5.0.6 - fix improve mount location error reporting
+
+From: Ian Kent <raven at themaw.net>
+
+The validate_location() function is meant to check for a small subset
+of map location errors only but the "improve mount location error
+reporting" patch inverted a logic test which has made the scope of
+the testing greater causing false positive fails. So add a check for
+those special cases.
+---
+
+ CHANGELOG           |    1 +
+ modules/parse_sun.c |   15 +++++++++++++++
+ 2 files changed, 16 insertions(+)
+
+
+--- autofs-5.0.6.orig/CHANGELOG
++++ autofs-5.0.6/CHANGELOG
+@@ -13,6 +13,7 @@
+ - fix submount shutdown race.
+ - fix fix map source check in file lookup.
+ - add disable move mount configure option.
++- fix improve mount location error reporting.
+ 
+ 28/06/2011 autofs-5.0.6
+ -----------------------
+--- autofs-5.0.6.orig/modules/parse_sun.c
++++ autofs-5.0.6/modules/parse_sun.c
+@@ -868,6 +868,21 @@ static int validate_location(unsigned in
+ 	 * have ":", "[" and "]".
+ 	 */
+ 	if (!check_colon(ptr)) {
++		/*
++		 * Don't forget cases where a colon is present but
++		 * not followed by a "/" or, if there is no colon at
++		 * all, we don't know if it is actually invalid since
++		 * it may be a map name by itself, for example.
++		 */
++		if (!strchr(ptr, ':') ||
++		    !strncmp(name, "file:", 5) ||
++		    !strncmp(name, "yp:", 3) ||
++		    !strncmp(name, "nis:", 4) ||
++		    !strncmp(name, "nisplus:", 8) ||
++		    !strncmp(name, "ldap:", 5) ||
++		    !strncmp(name, "ldaps:", 6) ||
++		    !strncmp(name, "dir:", 4))
++			return 1;
+ 		error(logopt,
+ 		      "expected colon delimeter not found in location %s",
+ 		      loc);
diff --git a/autofs.spec b/autofs.spec
index b871fa5..e9e8a83 100644
--- a/autofs.spec
+++ b/autofs.spec
@@ -4,7 +4,7 @@
 Summary: A tool for automatically mounting and unmounting filesystems
 Name: autofs
 Version: 5.0.6
-Release: 4%{?dist}
+Release: 5%{?dist}
 Epoch: 1
 License: GPLv2+
 Group: System Environment/Daemons
@@ -23,6 +23,8 @@ Patch11: autofs-5.0.6-fix-submount-shutdown-race.patch
 Patch12: autofs-5.0.6-fix-fix-map-source-check-in-file-lookup.patch
 Patch13: autofs-5.0.6-add-disable-move-mount-configure-option.patch
 Patch14: autofs-5.0.6-fix-lsb-service-name-in-init-script-2.patch
+Patch15: autofs-5.0.6-fix-fix-wait-for-master-source-mutex.patch
+Patch16: autofs-5.0.6-fix-improve-mount-location-error-reporting.patch
 Buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: autoconf, hesiod-devel, openldap-devel, bison, flex, libxml2-devel, cyrus-sasl-devel, openssl-devel module-init-tools util-linux nfs-utils e2fsprogs libtirpc-devel
 Conflicts: cyrus-sasl-lib < 2.1.23-9
@@ -79,6 +81,8 @@ echo %{version}-%{release} > .version
 %patch12 -p1
 %patch13 -p1
 %patch14 -p1
+%patch15 -p1
+%patch16 -p1
 
 %build
 #CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -133,6 +137,10 @@ fi
 %dir /etc/auto.master.d
 
 %changelog
+* Mon Jan 23 2012 Ian Kent <ikent at redhat.com> - 1:5.0.6-5
+- fix fix wait for master source mutex.
+- fix improve mount location error reporting (bz783496).
+
 * Fri Dec 2 2011 Ian Kent <ikent at redhat.com> - 1:5.0.6-4
 - fix lsb service name in init script 2 (bz712504).
 


More information about the scm-commits mailing list