* [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
* Re: [PATCH] fix suspicious rcu_dereference_check in net/sched/sch_fq_codel.c
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
1 sibling, 1 reply; 4+ messages in thread
From: Eric Dumazet @ 2014-12-09 21:42 UTC (permalink / raw)
To: Valdis Kletnieks
Cc: Eric Dumazet, John Fastabend, David S. Miller, linux-kernel,
netdev
On Tue, 2014-12-09 at 16:15 -0500, Valdis Kletnieks wrote:
> 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(-)
Acked-by: Eric Dumazet <edumazet@google.com>
Thanks !
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix suspicious rcu_dereference_check in net/sched/sch_fq_codel.c
2014-12-09 21:42 ` Eric Dumazet
@ 2014-12-09 23:13 ` John Fastabend
0 siblings, 0 replies; 4+ messages in thread
From: John Fastabend @ 2014-12-09 23:13 UTC (permalink / raw)
To: Eric Dumazet, Valdis Kletnieks
Cc: Eric Dumazet, David S. Miller, linux-kernel, netdev
On 12/09/2014 01:42 PM, Eric Dumazet wrote:
> On Tue, 2014-12-09 at 16:15 -0500, Valdis Kletnieks wrote:
>> 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(-)
>
> Acked-by: Eric Dumazet <edumazet@google.com>
>
> Thanks !
>
>
Great thanks for finding/fixing!
Acked-by: John Fastabend <john.r.fastabend@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] fix suspicious rcu_dereference_check in net/sched/sch_fq_codel.c
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-10 2:49 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2014-12-10 2:49 UTC (permalink / raw)
To: Valdis.Kletnieks; +Cc: edumazet, john.r.fastabend, linux-kernel, netdev
From: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Date: Tue, 09 Dec 2014 16:15:50 -0500
> 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>
Applied and queued up for -stable, thanks.
^ permalink raw reply [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).