netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] cls_matchall: fix tcf_unbind_filter missing
@ 2018-08-14  9:28 Hangbin Liu
  2018-08-14 22:32 ` Cong Wang
  2018-08-16 19:09 ` David Miller
  0 siblings, 2 replies; 3+ messages in thread
From: Hangbin Liu @ 2018-08-14  9:28 UTC (permalink / raw)
  To: netdev; +Cc: David Miller, WANG Cong, Yotam Gigi, Jiri Pirko, Hangbin Liu

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>
---
 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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] cls_matchall: fix tcf_unbind_filter missing
  2018-08-14  9:28 [PATCH net] cls_matchall: fix tcf_unbind_filter missing Hangbin Liu
@ 2018-08-14 22:32 ` Cong Wang
  2018-08-16 19:09 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: Cong Wang @ 2018-08-14 22:32 UTC (permalink / raw)
  To: Hangbin Liu
  Cc: Linux Kernel Network Developers, David Miller, Yotam Gigi,
	Jiri Pirko

On Tue, Aug 14, 2018 at 2:28 AM Hangbin Liu <liuhangbin@gmail.com> wrote:
>
> 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>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] cls_matchall: fix tcf_unbind_filter missing
  2018-08-14  9:28 [PATCH net] cls_matchall: fix tcf_unbind_filter missing Hangbin Liu
  2018-08-14 22:32 ` Cong Wang
@ 2018-08-16 19:09 ` David Miller
  1 sibling, 0 replies; 3+ messages in thread
From: David Miller @ 2018-08-16 19:09 UTC (permalink / raw)
  To: liuhangbin; +Cc: netdev, xiyou.wangcong, yotamg, jiri

From: Hangbin Liu <liuhangbin@gmail.com>
Date: Tue, 14 Aug 2018 17:28:26 +0800

> 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>

Applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-08-16 22:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-14  9:28 [PATCH net] cls_matchall: fix tcf_unbind_filter missing Hangbin Liu
2018-08-14 22:32 ` Cong Wang
2018-08-16 19:09 ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).