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]
Date:   Fri, 21 Feb 2020 21:49:47 +0530
From:   madhuparnabhowmik10@...il.com
To:     davem@...emloft.net, gregkh@...uxfoundation.org,
        tglx@...utronix.de, allison@...utok.net
Cc:     netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
        joel@...lfernandes.org, frextrite@...il.com,
        linux-kernel-mentees@...ts.linuxfoundation.org, paulmck@...nel.org,
        Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
Subject: [PATCH] net: 802: psnap.c: Use built-in RCU list checking

From: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>

list_for_each_entry_rcu() has built-in RCU and lock checking.

Pass cond argument to list_for_each_entry_rcu() to silence
false lockdep warning when CONFIG_PROVE_RCU_LIST is enabled
by default.

Signed-off-by: Madhuparna Bhowmik <madhuparnabhowmik10@...il.com>
---
 net/802/psnap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/802/psnap.c b/net/802/psnap.c
index 40ab2aea7b31..4492e8d7ad20 100644
--- a/net/802/psnap.c
+++ b/net/802/psnap.c
@@ -30,7 +30,7 @@ static struct datalink_proto *find_snap_client(const unsigned char *desc)
 {
 	struct datalink_proto *proto = NULL, *p;
 
-	list_for_each_entry_rcu(p, &snap_list, node) {
+	list_for_each_entry_rcu(p, &snap_list, node, lockdep_is_held(&snap_lock)) {
 		if (!memcmp(p->type, desc, 5)) {
 			proto = p;
 			break;
-- 
2.17.1

Powered by blists - more mailing lists