vport.c: Use built-in RCU list checking
Subsystems (3)
PATCH 2/4 vport.c: Use built-in RCU list checking
From: Madhuparna Bhowmik <[email protected]>
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 <[email protected]>
--- net/openvswitch/vport.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
net/openvswitch/vport.c +2 -1
@@ -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;
Signature · 6 lines
2.17.1 _______________________________________________ Linux-kernel-mentees mailing list [email protected] https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees
From: [email protected]
Date: Wed, 19 Feb 2020 01:27:42 +0530
Quoted 9 lines
From: Madhuparna Bhowmik <[email protected]>
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 whenCONFIG_PROVE_RCU_LISTis enabled by default.Signed-off-by Madhuparna Bhowmik <[email protected]>
Applied.