aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMadhuparna Bhowmik2020-02-21 21:49:47 +0530
committerDavid S. Miller2020-02-24 13:02:53 -0800
commit0a087bf232c35dbec3769c4402ca737995d7b734 (patch)
tree77edc9546fc909aa78d250392e713c62c1aa92db
parent958a93c15466c69e2ec531332e67011f549943bd (diff)
net: 802: psnap.c: Use built-in RCU list checking
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@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/802/psnap.c2
1 files changed, 1 insertions, 1 deletions
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;