diff options
Diffstat (limited to 'net/sched/sch_api.c')
-rw-r--r-- | net/sched/sch_api.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index 58bed7599db7..ca6248345937 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -1781,7 +1781,7 @@ int tc_classify_compat(struct sk_buff *skb, const struct tcf_proto *tp, | |||
1781 | __be16 protocol = skb->protocol; | 1781 | __be16 protocol = skb->protocol; |
1782 | int err; | 1782 | int err; |
1783 | 1783 | ||
1784 | for (; tp; tp = tp->next) { | 1784 | for (; tp; tp = rcu_dereference_bh(tp->next)) { |
1785 | if (tp->protocol != protocol && | 1785 | if (tp->protocol != protocol && |
1786 | tp->protocol != htons(ETH_P_ALL)) | 1786 | tp->protocol != htons(ETH_P_ALL)) |
1787 | continue; | 1787 | continue; |
@@ -1833,15 +1833,15 @@ void tcf_destroy(struct tcf_proto *tp) | |||
1833 | { | 1833 | { |
1834 | tp->ops->destroy(tp); | 1834 | tp->ops->destroy(tp); |
1835 | module_put(tp->ops->owner); | 1835 | module_put(tp->ops->owner); |
1836 | kfree(tp); | 1836 | kfree_rcu(tp, rcu); |
1837 | } | 1837 | } |
1838 | 1838 | ||
1839 | void tcf_destroy_chain(struct tcf_proto **fl) | 1839 | void tcf_destroy_chain(struct tcf_proto __rcu **fl) |
1840 | { | 1840 | { |
1841 | struct tcf_proto *tp; | 1841 | struct tcf_proto *tp; |
1842 | 1842 | ||
1843 | while ((tp = *fl) != NULL) { | 1843 | while ((tp = rtnl_dereference(*fl)) != NULL) { |
1844 | *fl = tp->next; | 1844 | RCU_INIT_POINTER(*fl, tp->next); |
1845 | tcf_destroy(tp); | 1845 | tcf_destroy(tp); |
1846 | } | 1846 | } |
1847 | } | 1847 | } |