~ubuntu-branches/ubuntu/precise/autofs5/precise

« back to all changes in this revision

Viewing changes to debian/patches/autofs-5.0.5-fix-expire-race.patch

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2011-07-03 14:35:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20110703143546-nej26krjij0rf792
Tags: 5.0.6-0ubuntu1
* New upstream release:
  - Dropped upstream patches 
  - Refreshed debian/patches/17ld.patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
autofs-5.0.3 - fix expire race
2
 
 
3
 
From: Ian Kent <raven@themaw.net>
4
 
 
5
 
For multi-mounts, if a mount request comes in and does not complete
6
 
before a concurrent expire autofs will not recognize that the tree
7
 
has become busy which can lead to a partial expire leaving the
8
 
multi-mount non-functional.
9
 
---
10
 
 
11
 
 CHANGELOG    |    1 +
12
 
 lib/mounts.c |    5 ++++-
13
 
 2 files changed, 5 insertions(+), 1 deletions(-)
14
 
 
15
 
 
16
 
diff --git a/CHANGELOG b/CHANGELOG
17
 
index e55b873..b9d8299 100644
18
 
--- a/CHANGELOG
19
 
+++ b/CHANGELOG
20
 
@@ -60,6 +60,7 @@
21
 
 - auto adjust ldap page size.
22
 
 - fix prune cache valid check.
23
 
 - fix mountd vers retry.
24
 
+- fix expire race.
25
 
 
26
 
 03/09/2009 autofs-5.0.5
27
 
 -----------------------
28
 
diff --git a/lib/mounts.c b/lib/mounts.c
29
 
index 4c44982..f26579e 100644
30
 
--- a/lib/mounts.c
31
 
+++ b/lib/mounts.c
32
 
@@ -1525,8 +1525,11 @@ int umount_multi_triggers(struct autofs_point *ap, struct mapent *me, char *root
33
 
                oe_base = oe->key + strlen(root);
34
 
                left += umount_multi_triggers(ap, oe, root, oe_base);
35
 
 
36
 
-               if (oe->ioctlfd != -1)
37
 
+               if (oe->ioctlfd != -1 ||
38
 
+                   is_mounted(_PROC_MOUNTS, oe->key, MNTS_REAL)) {
39
 
                        left++;
40
 
+                       break;
41
 
+               }
42
 
        }
43
 
 
44
 
        if (left)