Skip to content

Commit

Permalink
cgroup: net_cls: Remove rcu_read_lock/unlock
Browse files Browse the repository at this point in the history
As Eric pointed out:
"Hey task_cls_classid() has its own rcu protection since commit
3fb5a99 (cls_cgroup: Fix rcu lockdep warning)

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

Signed-off-by: Daniel Wagner <daniel.wagner@bmw-carit.de>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Li Zefan <lizefan@huawei.com>
Cc: Neil Horman <nhorman@tuxdriver.com>
Cc: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Cc: Tejun Heo <tj@kernel.org>
Cc: netdev@vger.kernel.org
Cc: cgroups@vger.kernel.org
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Daniel Wagner authored and David S. Miller committed Oct 26, 2012
1 parent 920750c commit 3ace03c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions net/core/sock.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit 3ace03c

Please sign in to comment.