Pārlūkot izejas kodu

net_sched: fix suspicious RCU usage in cls_bpf_classify()

Fixes: commit 1f947bf151e90ec0baad2948 ("net: sched: rcu'ify cls_bpf")
Cc: John Fastabend <john.fastabend@gmail.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Acked-by: John Fastabend <john.r.fastabend@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
WANG Cong 11 gadi atpakaļ
vecāks
revīzija
80dcbd12fb
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      net/sched/cls_bpf.c

+ 1 - 1
net/sched/cls_bpf.c

@@ -52,7 +52,7 @@ static const struct nla_policy bpf_policy[TCA_BPF_MAX + 1] = {
 static int cls_bpf_classify(struct sk_buff *skb, const struct tcf_proto *tp,
 			    struct tcf_result *res)
 {
-	struct cls_bpf_head *head = rcu_dereference(tp->root);
+	struct cls_bpf_head *head = rcu_dereference_bh(tp->root);
 	struct cls_bpf_prog *prog;
 	int ret;