summaryrefslogtreecommitdiff
path: root/net/netlabel/netlabel_unlabeled.c
diff options
context:
space:
mode:
authorPaul Moore <paul.moore@hp.com>2007-10-26 15:29:08 +0400
committerDavid S. Miller <davem@davemloft.net>2007-10-26 15:29:08 +0400
commit4be2700fb7b95f2a7cef9324879cafccab8774fc (patch)
tree8e3839c4e1c23c7d2b105f9ea45fb0891e3f0312 /net/netlabel/netlabel_unlabeled.c
parent94d3b1e586f6d4c7150501bde284c544ce99073c (diff)
downloadlinux-4be2700fb7b95f2a7cef9324879cafccab8774fc.tar.xz
[NetLabel]: correct usage of RCU locking
This fixes some awkward, and perhaps even problematic, RCU lock usage in the NetLabel code as well as some other related trivial cleanups found when looking through the RCU locking. Most of the changes involve removing the redundant RCU read locks wrapping spinlocks in the case of a RCU writer. Signed-off-by: Paul Moore <paul.moore@hp.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/netlabel/netlabel_unlabeled.c')
-rw-r--r--net/netlabel/netlabel_unlabeled.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/net/netlabel/netlabel_unlabeled.c b/net/netlabel/netlabel_unlabeled.c
index 5c303c68af1d..348292450deb 100644
--- a/net/netlabel/netlabel_unlabeled.c
+++ b/net/netlabel/netlabel_unlabeled.c
@@ -84,12 +84,10 @@ static void netlbl_unlabel_acceptflg_set(u8 value,
struct audit_buffer *audit_buf;
u8 old_val;
- rcu_read_lock();
- old_val = netlabel_unlabel_acceptflg;
spin_lock(&netlabel_unlabel_acceptflg_lock);
+ old_val = netlabel_unlabel_acceptflg;
netlabel_unlabel_acceptflg = value;
spin_unlock(&netlabel_unlabel_acceptflg_lock);
- rcu_read_unlock();
audit_buf = netlbl_audit_start_common(AUDIT_MAC_UNLBL_ALLOW,
audit_info);