summaryrefslogtreecommitdiff
path: root/net
diff options
context:
space:
mode:
authorMadhuparna Bhowmik <madhuparnabhowmik10@gmail.com>2020-02-19 01:27:42 +0530
committerDavid S. Miller <davem@davemloft.net>2020-02-18 12:46:27 -0800
commitfed48423f14d9fa184b262d7c35d9dc1c3698500 (patch)
tree9702611dc88775b7ff92beedc3c84fce948fc067 /net
parent7790614616458b6dd3d90652acfa6b7443ee7041 (diff)
downloadlwn-fed48423f14d9fa184b262d7c35d9dc1c3698500.tar.gz
lwn-fed48423f14d9fa184b262d7c35d9dc1c3698500.zip
vport.c: Use built-in RCU list checking
hlist_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>
Diffstat (limited to 'net')
-rw-r--r--net/openvswitch/vport.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/net/openvswitch/vport.c b/net/openvswitch/vport.c
index 5da9392b03d6..47febb4504f0 100644
--- a/net/openvswitch/vport.c
+++ b/net/openvswitch/vport.c
@@ -96,7 +96,8 @@ struct vport *ovs_vport_locate(const struct net *net, const char *name)
struct hlist_head *bucket = hash_bucket(net, name);
struct vport *vport;
- hlist_for_each_entry_rcu(vport, bucket, hash_node)
+ hlist_for_each_entry_rcu(vport, bucket, hash_node,
+ lockdep_ovsl_is_held())
if (!strcmp(name, ovs_vport_name(vport)) &&
net_eq(ovs_dp_get_net(vport->dp), net))
return vport;