From: Hangbin Liu Date: Tue, 14 Aug 2018 09:28:26 +0000 (+0800) Subject: cls_matchall: fix tcf_unbind_filter missing X-Git-Tag: v4.17.18~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=160ecd519ead5ff77f5c86df5bc36ce0c3d69e35;p=thirdparty%2Fkernel%2Fstable.git cls_matchall: fix tcf_unbind_filter missing [ Upstream commit a51c76b4dfb30496dc65396a957ef0f06af7fb22 ] Fix tcf_unbind_filter missing in cls_matchall as this will trigger WARN_ON() in cbq_destroy_class(). Fixes: fd62d9f5c575f ("net/sched: matchall: Fix configuration race") Reported-by: Li Shuang Signed-off-by: Hangbin Liu Acked-by: Cong Wang Signed-off-by: David S. Miller Signed-off-by: Greg Kroah-Hartman --- diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 2ba721a590a72..a74b4d6ee1864 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -122,6 +122,8 @@ static void mall_destroy(struct tcf_proto *tp, struct netlink_ext_ack *extack) if (!head) return; + tcf_unbind_filter(tp, &head->res); + if (!tc_skip_hw(head->flags)) mall_destroy_hw_filter(tp, head, (unsigned long) head, extack);