lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1315276536-10910-1-git-send-email-glommer@parallels.com>
Date:	Mon,  5 Sep 2011 23:35:36 -0300
From:	Glauber Costa <glommer@...allels.com>
To:	linux-kernel@...r.kernel.org
Cc:	Glauber Costa <glommer@...allels.com>,
	"Paul E. McKenney" <paulmck@...ux.vnet.ibm.com>,
	Li Zefan <lizf@...fujitsu.com>,
	"David S. Miller" <davem@...emloft.net>
Subject: [PATCH] cleanup: no need to call rcu_lock in sock_update_classid()

There is no need to protect

According to the all-knowing git log, this was inserted here to prevent a
warning in commit 1144182a. But 3fb5a991 also does that in a different place.
>From reading it, I believe they are fixing the same warning, so no need
for both.

Signed-off-by: Glauber Costa <glommer@...allels.com>
CC: Paul E. McKenney <paulmck@...ux.vnet.ibm.com>
CC: Li Zefan <lizf@...fujitsu.com>
CC: David S. Miller <davem@...emloft.net>
---
 net/core/sock.c |    2 --
 1 files changed, 0 insertions(+), 2 deletions(-)

diff --git a/net/core/sock.c b/net/core/sock.c
index bc745d0..3449df8 100644
--- a/net/core/sock.c
+++ b/net/core/sock.c
@@ -1107,9 +1107,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 && classid != sk->sk_classid)
 		sk->sk_classid = classid;
 }
-- 
1.7.6

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ