From: Daniel Wagner <wagi@monom.org>
To: netdev@vger.kernel.org, cgroups@vger.kernel.org
Cc: Daniel Wagner <daniel.wagner@bmw-carit.de>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Glauber Costa <glommer@parallels.com>,
Li Zefan <lizefan@huawei.com>,
Neil Horman <nhorman@tuxdriver.com>,
"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
Tejun Heo <tj@kernel.org>
Subject: [PATCH v1 3/5] cgroup: net_cls: Remove rcu_read_lock/unlock
Date: Thu, 25 Oct 2012 16:16:57 +0200 [thread overview]
Message-ID: <1351174619-5096-4-git-send-email-wagi@monom.org> (raw)
In-Reply-To: <1351174619-5096-1-git-send-email-wagi@monom.org>
From: Daniel Wagner <daniel.wagner@bmw-carit.de>
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 <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
---
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
next prev parent reply other threads:[~2012-10-25 14:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 14:16 [PATCH v1 0/5] Rework net_cls update socket logic Daniel Wagner
[not found] ` <1351174619-5096-1-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 14:16 ` [PATCH v1 1/5] cgroup: net_prio: Mark local used function static Daniel Wagner
[not found] ` <1351174619-5096-2-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:28 ` Neil Horman
2012-10-26 7:41 ` David Miller
2012-10-25 14:16 ` [PATCH v1 4/5] cgroup: net_cls: Pass in task to sock_update_classid() Daniel Wagner
[not found] ` <1351174619-5096-5-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:11 ` Tejun Heo
2012-10-25 18:43 ` Neil Horman
[not found] ` <20121025184316.GD15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller
2012-10-25 14:16 ` [PATCH v1 2/5] cgroup: net_cls: Fix local variable type decleration Daniel Wagner
2012-10-25 18:35 ` Neil Horman
[not found] ` <20121025183516.GB15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:41 ` David Miller
2012-10-25 14:16 ` Daniel Wagner [this message]
[not found] ` <1351174619-5096-4-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 18:42 ` [PATCH v1 3/5] cgroup: net_cls: Remove rcu_read_lock/unlock Neil Horman
[not found] ` <20121025184252.GC15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller
2012-10-25 14:16 ` [PATCH v1 5/5] cgroup: net_cls: Rework update socket logic Daniel Wagner
[not found] ` <1351174619-5096-6-git-send-email-wagi-kQCPcA+X3s7YtjvyW6yDsg@public.gmane.org>
2012-10-25 19:07 ` Neil Horman
[not found] ` <20121025190734.GE15105-B26myB8xz7F8NnZeBjwnZQMhkBWG/bsMQH7oEaQurus@public.gmane.org>
2012-10-26 7:42 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1351174619-5096-4-git-send-email-wagi@monom.org \
--to=wagi@monom.org \
--cc=cgroups@vger.kernel.org \
--cc=daniel.wagner@bmw-carit.de \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=glommer@parallels.com \
--cc=lizefan@huawei.com \
--cc=netdev@vger.kernel.org \
--cc=nhorman@tuxdriver.com \
--cc=paulmck@linux.vnet.ibm.com \
--cc=tj@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).