Skip to content

Commit 7790614

Browse files
Madhuparna Bhowmikdavem330
authored andcommitted
meter.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>
1 parent 9facfdb commit 7790614

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎net/openvswitch/meter.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp,
6161
struct hlist_head *head;
6262

6363
head = meter_hash_bucket(dp, meter_id);
64-
hlist_for_each_entry_rcu(meter, head, dp_hash_node) {
64+
hlist_for_each_entry_rcu(meter, head, dp_hash_node,
65+
lockdep_ovsl_is_held()) {
6566
if (meter->id == meter_id)
6667
return meter;
6768
}

0 commit comments

Comments
 (0)