netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fix suspicious rcu_dereference_check in net/sched/sch_fq_codel.c
@ 2014-12-09 21:15 Valdis Kletnieks
  2014-12-09 21:42 ` Eric Dumazet
  2014-12-10  2:49 ` David Miller
  0 siblings, 2 replies; 4+ messages in thread
From: Valdis Kletnieks @ 2014-12-09 21:15 UTC (permalink / raw)
  To: Eric Dumazet, John Fastabend, David S. Miller; +Cc: linux-kernel, netdev

commit 46e5da40ae (net: qdisc: use rcu prefix and silence
 sparse warnings) triggers a spurious warning:

net/sched/sch_fq_codel.c:97 suspicious rcu_dereference_check() usage!

The code should be using the _bh variant of rcu_dereference.

Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu>
---
 net/sched/sch_fq_codel.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sched/sch_fq_codel.c b/net/sched/sch_fq_codel.c
index b9ca32ebc1de..1e52decb7b59 100644
--- a/net/sched/sch_fq_codel.c
+++ b/net/sched/sch_fq_codel.c
@@ -94,7 +94,7 @@ static unsigned int fq_codel_classify(struct sk_buff *skb, struct Qdisc *sch,
 	    TC_H_MIN(skb->priority) <= q->flows_cnt)
 		return TC_H_MIN(skb->priority);
 
-	filter = rcu_dereference(q->filter_list);
+	filter = rcu_dereference_bh(q->filter_list);
 	if (!filter)
 		return fq_codel_hash(q, skb) + 1;
 
-- 
2.2.0

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

end of thread, other threads:[~2014-12-10  2:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-09 21:15 [PATCH] fix suspicious rcu_dereference_check in net/sched/sch_fq_codel.c Valdis Kletnieks
2014-12-09 21:42 ` Eric Dumazet
2014-12-09 23:13   ` John Fastabend
2014-12-10  2:49 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).