rpms/autofs/devel autofs-5.0.4-expire-specific-submount-only.patch, NONE, 1.1 autofs.spec, 1.260, 1.261
Ian Kent
iankent at fedoraproject.org
Wed Dec 3 05:15:55 UTC 2008
- Previous message (by thread): rpms/libchewing/devel .cvsignore, 1.5, 1.6 import.log, 1.2, 1.3 libchewing.spec, 1.22, 1.23 sources, 1.5, 1.6
- Next message (by thread): rpms/atk/devel .cvsignore, 1.39, 1.40 atk.spec, 1.61, 1.62 sources, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: iankent
Update of /cvs/pkgs/rpms/autofs/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv19583
Modified Files:
autofs.spec
Added Files:
autofs-5.0.4-expire-specific-submount-only.patch
Log Message:
* Wed Dec 3 2008 Ian Kent <kent at redhat.com> - 5.0.4-4
- fix nested submount expire deadlock.
autofs-5.0.4-expire-specific-submount-only.patch:
--- NEW FILE autofs-5.0.4-expire-specific-submount-only.patch ---
autofs-5.0.4 - expire specific submount only
From: Ian Kent <raven at themaw.net>
The submount shutdown at expire assumes that certain locks are not
held but when notifying submounts containing nested submounts not
all locks were being released. This leads to occassional deadlock
when child submounts attempt to shutdown.
---
CHANGELOG | 1 +
lib/master.c | 33 ++++++++-------------------------
2 files changed, 9 insertions(+), 25 deletions(-)
diff --git a/CHANGELOG b/CHANGELOG
index 4e8209e..88ca579 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,7 @@
??/??/2009 autofs-5.0.5
-----------------------
- fix dumb libxml2 check
+- fix nested submount expire deadlock.
4/11/2008 autofs-5.0.4
-----------------------
diff --git a/lib/master.c b/lib/master.c
index a243e6a..e1cc062 100644
--- a/lib/master.c
+++ b/lib/master.c
@@ -834,7 +834,6 @@ int master_notify_submount(struct autofs_point *ap, const char *path, enum state
{
struct list_head *head, *p;
struct autofs_point *this = NULL;
- size_t plen = strlen(path);
int ret = 1;
mounts_mutex_lock(ap);
@@ -842,37 +841,19 @@ int master_notify_submount(struct autofs_point *ap, const char *path, enum state
head = &ap->submounts;
p = head->prev;
while (p != head) {
- size_t len;
-
this = list_entry(p, struct autofs_point, mounts);
p = p->prev;
if (!master_submount_list_empty(this)) {
- if (!master_notify_submount(this, path, state)) {
- ret = 0;
- break;
- }
+ mounts_mutex_unlock(ap);
+ return master_notify_submount(this, path, state);
}
- len = strlen(this->path);
-
- /* Initial path not the same */
- if (strncmp(this->path, path, len))
+ /* path not the same */
+ if (strcmp(this->path, path))
continue;
- /*
- * Part of submount tree?
- * We must wait till we get to submount itself.
- * If it is tell caller by returning true.
- */
- if (plen > len) {
- /* Not part of this directory tree */
- if (path[len] != '/')
- continue;
- break;
- }
-
- /* Now we have a submount to expire */
+ /* Now we have found the submount we want to expire */
st_mutex_lock();
@@ -901,8 +882,10 @@ int master_notify_submount(struct autofs_point *ap, const char *path, enum state
struct timespec t = { 0, 300000000 };
struct timespec r;
- if (this->state != ST_SHUTDOWN)
+ if (this->state != ST_SHUTDOWN) {
+ ret = 0;
break;
+ }
st_mutex_unlock();
mounts_mutex_unlock(ap);
Index: autofs.spec
===================================================================
RCS file: /cvs/pkgs/rpms/autofs/devel/autofs.spec,v
retrieving revision 1.260
retrieving revision 1.261
diff -u -r1.260 -r1.261
--- autofs.spec 19 Nov 2008 07:45:02 -0000 1.260
+++ autofs.spec 3 Dec 2008 05:15:25 -0000 1.261
@@ -4,13 +4,14 @@
Summary: A tool for automatically mounting and unmounting filesystems
Name: autofs
Version: 5.0.4
-Release: 3
+Release: 4
Epoch: 1
License: GPLv2+
Group: System Environment/Daemons
URL: http://wiki.autofs.net/
Source: ftp://ftp.kernel.org/pub/linux/daemons/autofs/v5/autofs-%{version}.tar.bz2
Patch1: autofs-5.0.4-fix-dumb-libxml2-check.patch
+Patch2: autofs-5.0.4-expire-specific-submount-only.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
Requires: kernel >= 2.6.17
@@ -53,6 +54,7 @@
%setup -q
echo %{version}-%{release} > .version
%patch1 -p1
+%patch2 -p1
%build
#CFLAGS="$RPM_OPT_FLAGS" ./configure --prefix=/usr --libdir=%{_libdir}
@@ -105,6 +107,9 @@
%{_libdir}/autofs/
%changelog
+* Wed Dec 3 2008 Ian Kent <kent at redhat.com> - 5.0.4-4
+- fix nested submount expire deadlock.
+
* Wed Nov 19 2008 Ian Kent <kent at redhat.com> - 5.0.4-3
- fix libxml2 version check for deciding whether to use workaround.
- Previous message (by thread): rpms/libchewing/devel .cvsignore, 1.5, 1.6 import.log, 1.2, 1.3 libchewing.spec, 1.22, 1.23 sources, 1.5, 1.6
- Next message (by thread): rpms/atk/devel .cvsignore, 1.39, 1.40 atk.spec, 1.61, 1.62 sources, 1.39, 1.40
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list