From mboxrd@z Thu Jan 1 00:00:00 1970 From: Hangbin Liu Subject: [PATCH net] cls_matchall: fix tcf_unbind_filter missing Date: Tue, 14 Aug 2018 17:28:26 +0800 Message-ID: <1534238906-16097-1-git-send-email-liuhangbin@gmail.com> Cc: David Miller , WANG Cong , Yotam Gigi , Jiri Pirko , Hangbin Liu To: netdev@vger.kernel.org Return-path: Received: from mail-pg1-f181.google.com ([209.85.215.181]:43335 "EHLO mail-pg1-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728314AbeHNMPI (ORCPT ); Tue, 14 Aug 2018 08:15:08 -0400 Received: by mail-pg1-f181.google.com with SMTP id a14-v6so8849970pgv.10 for ; Tue, 14 Aug 2018 02:28:48 -0700 (PDT) Sender: netdev-owner@vger.kernel.org List-ID: 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 --- net/sched/cls_matchall.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/net/sched/cls_matchall.c b/net/sched/cls_matchall.c index 47b207e..7ad65da 100644 --- a/net/sched/cls_matchall.c +++ b/net/sched/cls_matchall.c @@ -111,6 +111,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); -- 2.5.5