net_sched: fix suspicious RCU usage in cls_bpf_classify()
authorWANG Cong <xiyou.wangcong@gmail.com>
Mon, 15 Sep 2014 21:21:50 +0000 (14:21 -0700)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 Sep 2014 21:42:08 +0000 (17:42 -0400)
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>
net/sched/cls_bpf.c

index 6a7386e6e5a8831c0d237477a7238f4fd81acb1a..4e3f5bfc0b26d7ed6ea1699bac3ecef78a578e23 100644 (file)
@@ -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;