All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/4] meter.c: Use built-in RCU list checking
@ 2020-02-18 19:54 ` madhuparnabhowmik10
  0 siblings, 0 replies; 4+ messages in thread
From: madhuparnabhowmik10 @ 2020-02-18 19:54 UTC (permalink / raw)
  To: pshelar, davem
  Cc: netdev, dev, linux-kernel, joel, frextrite, linux-kernel-mentees,
	paulmck, Madhuparna Bhowmik

From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>

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>
---
 net/openvswitch/meter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index 3323b79ff548..5010d1ddd4bd 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp,
 	struct hlist_head *head;
 
 	head = meter_hash_bucket(dp, meter_id);
-	hlist_for_each_entry_rcu(meter, head, dp_hash_node) {
+	hlist_for_each_entry_rcu(meter, head, dp_hash_node,
+				lockdep_ovsl_is_held()) {
 		if (meter->id == meter_id)
 			return meter;
 	}
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Linux-kernel-mentees] [PATCH 1/4] meter.c: Use built-in RCU list checking
@ 2020-02-18 19:54 ` madhuparnabhowmik10
  0 siblings, 0 replies; 4+ messages in thread
From: madhuparnabhowmik10 @ 2020-02-18 19:54 UTC (permalink / raw)
  To: pshelar, davem
  Cc: dev, paulmck, netdev, linux-kernel, Madhuparna Bhowmik, joel,
	linux-kernel-mentees

From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>

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>
---
 net/openvswitch/meter.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/net/openvswitch/meter.c b/net/openvswitch/meter.c
index 3323b79ff548..5010d1ddd4bd 100644
--- a/net/openvswitch/meter.c
+++ b/net/openvswitch/meter.c
@@ -61,7 +61,8 @@ static struct dp_meter *lookup_meter(const struct datapath *dp,
 	struct hlist_head *head;
 
 	head = meter_hash_bucket(dp, meter_id);
-	hlist_for_each_entry_rcu(meter, head, dp_hash_node) {
+	hlist_for_each_entry_rcu(meter, head, dp_hash_node,
+				lockdep_ovsl_is_held()) {
 		if (meter->id == meter_id)
 			return meter;
 	}
-- 
2.17.1

_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/4] meter.c: Use built-in RCU list checking
  2020-02-18 19:54 ` [Linux-kernel-mentees] " madhuparnabhowmik10
@ 2020-02-18 20:46   ` David Miller
  -1 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-02-18 20:46 UTC (permalink / raw)
  To: madhuparnabhowmik10
  Cc: pshelar, netdev, dev, linux-kernel, joel, frextrite,
	linux-kernel-mentees, paulmck

From: madhuparnabhowmik10@gmail.com
Date: Wed, 19 Feb 2020 01:24:25 +0530

> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> 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>

Applied.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Linux-kernel-mentees] [PATCH 1/4] meter.c: Use built-in RCU list checking
@ 2020-02-18 20:46   ` David Miller
  0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2020-02-18 20:46 UTC (permalink / raw)
  To: madhuparnabhowmik10
  Cc: dev, paulmck, netdev, linux-kernel, pshelar, joel, linux-kernel-mentees

From: madhuparnabhowmik10@gmail.com
Date: Wed, 19 Feb 2020 01:24:25 +0530

> From: Madhuparna Bhowmik <madhuparnabhowmik10@gmail.com>
> 
> 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>

Applied.
_______________________________________________
Linux-kernel-mentees mailing list
Linux-kernel-mentees@lists.linuxfoundation.org
https://lists.linuxfoundation.org/mailman/listinfo/linux-kernel-mentees

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-02-18 20:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-18 19:54 [PATCH 1/4] meter.c: Use built-in RCU list checking madhuparnabhowmik10
2020-02-18 19:54 ` [Linux-kernel-mentees] " madhuparnabhowmik10
2020-02-18 20:46 ` David Miller
2020-02-18 20:46   ` [Linux-kernel-mentees] " David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.