summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorJiri Pirko <jpirko@redhat.com>2009-04-14 20:17:16 +0200
committerIngo Molnar <mingo@elte.hu>2009-04-15 12:05:25 +0200
commit05725f7eb4b8acb147c5fc7b91397b1f6bcab00d (patch)
tree1f22c6bec3429f7ec9ebb8acd25672249e39b380 /security
parent72c6a9870f901045f2464c3dc6ee8914bfdc07aa (diff)
downloadop-kernel-dev-05725f7eb4b8acb147c5fc7b91397b1f6bcab00d.zip
op-kernel-dev-05725f7eb4b8acb147c5fc7b91397b1f6bcab00d.tar.gz
rculist: use list_entry_rcu in places where it's appropriate
Use previously introduced list_entry_rcu instead of an open-coded list_entry + rcu_dereference combination. Signed-off-by: Jiri Pirko <jpirko@redhat.com> Reviewed-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Cc: dipankar@in.ibm.com LKML-Reference: <20090414181715.GA3634@psychotron.englab.brq.redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'security')
-rw-r--r--security/integrity/ima/ima_fs.c4
-rw-r--r--security/smack/smackfs.c8
2 files changed, 6 insertions, 6 deletions
diff --git a/security/integrity/ima/ima_fs.c b/security/integrity/ima/ima_fs.c
index ffbe259..510186f 100644
--- a/security/integrity/ima/ima_fs.c
+++ b/security/integrity/ima/ima_fs.c
@@ -84,8 +84,8 @@ static void *ima_measurements_next(struct seq_file *m, void *v, loff_t *pos)
* against concurrent list-extension
*/
rcu_read_lock();
- qe = list_entry(rcu_dereference(qe->later.next),
- struct ima_queue_entry, later);
+ qe = list_entry_rcu(qe->later.next,
+ struct ima_queue_entry, later);
rcu_read_unlock();
(*pos)++;
diff --git a/security/smack/smackfs.c b/security/smack/smackfs.c
index e03a7e1..11d2cb1 100644
--- a/security/smack/smackfs.c
+++ b/security/smack/smackfs.c
@@ -734,8 +734,8 @@ static void smk_netlbladdr_insert(struct smk_netlbladdr *new)
return;
}
- m = list_entry(rcu_dereference(smk_netlbladdr_list.next),
- struct smk_netlbladdr, list);
+ m = list_entry_rcu(smk_netlbladdr_list.next,
+ struct smk_netlbladdr, list);
/* the comparison '>' is a bit hacky, but works */
if (new->smk_mask.s_addr > m->smk_mask.s_addr) {
@@ -748,8 +748,8 @@ static void smk_netlbladdr_insert(struct smk_netlbladdr *new)
list_add_rcu(&new->list, &m->list);
return;
}
- m_next = list_entry(rcu_dereference(m->list.next),
- struct smk_netlbladdr, list);
+ m_next = list_entry_rcu(m->list.next,
+ struct smk_netlbladdr, list);
if (new->smk_mask.s_addr > m_next->smk_mask.s_addr) {
list_add_rcu(&new->list, &m->list);
return;
OpenPOWER on IntegriCloud