blob: 6002599e52bf5d0d53adfcf2862e38d4f7856223 [file] [log] [blame]
From foo@baz Tue Aug 21 07:39:57 CEST 2018
From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 14 Aug 2018 17:28:26 +0800
Subject: cls_matchall: fix tcf_unbind_filter missing
From: Hangbin Liu <liuhangbin@gmail.com>
[ 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 <shuali@redhat.com>
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
Acked-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
net/sched/cls_matchall.c | 2 ++
1 file changed, 2 insertions(+)
--- a/net/sched/cls_matchall.c
+++ b/net/sched/cls_matchall.c
@@ -94,6 +94,8 @@ static bool mall_destroy(struct tcf_prot
if (!head)
return true;
+ tcf_unbind_filter(tp, &head->res);
+
if (tc_should_offload(dev, tp, head->flags))
mall_destroy_hw_filter(tp, head, (unsigned long) head);