Thread (5 messages) 5 messages, 3 authors, 2012-10-25
STALE4973d

[PATCH v1 3/5] cgroup: net_cls: Remove rcu_read_lock/unlock

From: Daniel Wagner <hidden>
Date: 2012-10-25 14:17:06
Also in: netdev
Subsystem: networking [general], networking [sockets], the rest · Maintainers: "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Kuniyuki Iwashima, Willem de Bruijn, Linus Torvalds

From: Daniel Wagner <redacted>

As Eric pointed out:
"Hey task_cls_classid() has its own rcu protection since commit
3fb5a991916091a908d (cls_cgroup: Fix rcu lockdep warning)

So we can safely revert Paul commit (1144182a8757f2a1)
(We no longer need rcu_read_lock/unlock here)"

Signed-off-by: Daniel Wagner <redacted>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Glauber Costa <redacted>
Cc: Li Zefan <redacted>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Paul E. McKenney <redacted>
Cc: Tejun Heo <tj@kernel.org>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
---
 net/core/sock.c | 2 --
 1 file changed, 2 deletions(-)
diff --git a/net/core/sock.c b/net/core/sock.c
index c49412c..9fedbbf 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1221,9 +1221,7 @@ void sock_update_classid(struct sock *sk)
 {
 	u32 classid;
 
-	rcu_read_lock();  /* doing current task, which cannot vanish. */
 	classid = task_cls_classid(current);
-	rcu_read_unlock();
 	if (classid != sk->sk_classid)
 		sk->sk_classid = classid;
 }
-- 
1.8.0.rc0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help