aboutsummaryrefslogtreecommitdiffstats
path: root/security/apparmor/apparmorfs.c
diff options
context:
space:
mode:
authorIngo Molnar <[email protected]>2013-11-06 05:39:45 +0000
committerIngo Molnar <[email protected]>2013-11-06 05:39:45 +0000
commit97c53b402fcadb50201c23914f614bf8430d9c20 (patch)
tree3c9b94e866d150c3a2d8ac853e388c38fade8b45 /security/apparmor/apparmorfs.c
parenthung_task debugging: Add tracepoint to report the hang (diff)
parentLinux 3.12 (diff)
downloadkernel-97c53b402fcadb50201c23914f614bf8430d9c20.tar.gz
kernel-97c53b402fcadb50201c23914f614bf8430d9c20.zip
Merge tag 'v3.12' into core/locking to pick up mutex upates
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'security/apparmor/apparmorfs.c')
-rw-r--r--security/apparmor/apparmorfs.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 95c2b2689a03..7db9954f1af2 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -580,15 +580,13 @@ static struct aa_namespace *__next_namespace(struct aa_namespace *root,
/* check if the next ns is a sibling, parent, gp, .. */
parent = ns->parent;
- while (parent) {
+ while (ns != root) {
mutex_unlock(&ns->lock);
next = list_entry_next(ns, base.list);
if (!list_entry_is_head(next, &parent->sub_ns, base.list)) {
mutex_lock(&next->lock);
return next;
}
- if (parent == root)
- return NULL;
ns = parent;
parent = parent->parent;
}