[apparmor] [PATCH 30/32] apparmor: update compatibility patch for RCU locking
John Johansen
john.johansen at canonical.com
Wed Jan 16 21:28:59 UTC 2013
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
security/apparmor/apparmorfs.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/security/apparmor/apparmorfs.c b/security/apparmor/apparmorfs.c
index 545cecf..e86b3ad 100644
--- a/security/apparmor/apparmorfs.c
+++ b/security/apparmor/apparmorfs.c
@@ -526,16 +526,16 @@ static struct aa_namespace *__next_namespace(struct aa_namespace *root,
if (!list_empty(&ns->sub_ns)) {
struct aa_namespace *next;
next = list_first_entry(&ns->sub_ns, typeof(*ns), base.list);
- read_lock(&next->lock);
+ mutex_lock(&next->lock);
return next;
}
/* check if the next ns is a sibling, parent, gp, .. */
parent = ns->parent;
while (parent) {
- read_unlock(&ns->lock);
+ mutex_unlock(&ns->lock);
list_for_each_entry_continue(ns, &parent->sub_ns, base.list) {
- read_lock(&ns->lock);
+ mutex_lock(&ns->lock);
return ns;
}
if (parent == root)
@@ -638,7 +638,7 @@ static void *p_start(struct seq_file *f, loff_t *pos)
/* find the first profile */
- read_lock(&root->lock);
+ mutex_lock(&root->lock);
profile = __first_profile(root, root);
/* skip to position */
@@ -682,9 +682,9 @@ static void p_stop(struct seq_file *f, void *p)
if (profile) {
for (ns = profile->ns; ns && ns != root; ns = ns->parent)
- read_unlock(&ns->lock);
+ mutex_unlock(&ns->lock);
}
- read_unlock(&root->lock);
+ mutex_unlock(&root->lock);
aa_put_namespace(root);
}
--
1.7.10.4
More information about the AppArmor
mailing list