From: Al Viro <viro@ZenIV.linux.org.uk>
To: Jamal Hadi Salim <jhs@mojatatu.com>
Cc: netdev@vger.kernel.org, Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
stable@vger.kernel.org
Subject: Re: [PATCH 1/7] fix hnode refcounting
Date: Sat, 8 Sep 2018 16:03:41 +0100 [thread overview]
Message-ID: <20180908150340.GC19965@ZenIV.linux.org.uk> (raw)
In-Reply-To: <612ba054-370d-d118-b439-c68ea466eec9@mojatatu.com>
On Fri, Sep 07, 2018 at 08:13:56AM -0400, Jamal Hadi Salim wrote:
> > } else {
> > bool last;
> >
> > err = tfilter_del_notify(net, skb, n, tp, block,
> > q, parent, fh, false, &last,
> > extack);
> > How can we ever get there with NULL fh?
> >
>
> Try:
> tc filter delete dev $P parent ffff: protocol ip prio 10 u32
> tcm handle is 0, so will hit that code path.
Huh? It will hit tcf_proto_destroy() (and thus u32_destroy()), but where will
it hit u32_delete()? Sure, we have fh == NULL there; what happens next is
if (t->tcm_handle == 0) {
tcf_chain_tp_remove(chain, &chain_info, tp);
tfilter_notify(net, skb, n, tp, block, q, parent, fh,
RTM_DELTFILTER, false);
tcf_proto_destroy(tp, extack);
and that's it. IDGI... Direct experiment shows that on e.g.
tc qdisc add dev eth0 ingress
tc filter add dev eth0 parent ffff: protocol ip prio 10 u32 match ip protocol 1 0xff
tc filter delete dev eth0 parent ffff: protocol ip prio 10 u32
we get u32_destroy() called, with u32_destroy_hnode() called by it,
but no u32_delete() is called at all, let alone with ht == NULL...
prev parent reply other threads:[~2018-09-08 19:49 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-05 19:01 [PATCHES] cls_u32 cleanups and fixes Al Viro
2018-09-05 19:04 ` [PATCH 1/7] fix hnode refcounting Al Viro
2018-09-05 19:04 ` [PATCH 2/7] mark root hnode explicitly Al Viro
2018-09-06 10:28 ` Jamal Hadi Salim
2018-09-06 10:34 ` Jamal Hadi Salim
2018-09-06 10:42 ` Jamal Hadi Salim
2018-09-06 10:59 ` Al Viro
2018-09-06 11:04 ` Jamal Hadi Salim
2018-09-07 2:57 ` Cong Wang
2018-09-07 3:04 ` Al Viro
2018-09-07 3:23 ` Cong Wang
2018-09-07 3:49 ` Al Viro
2018-09-07 4:14 ` Cong Wang
2018-09-05 19:04 ` [PATCH 3/7] make sure that divisor is a power of 2 Al Viro
2018-09-06 10:28 ` Jamal Hadi Salim
2018-09-05 19:04 ` [PATCH 4/7] get rid of unused argument of u32_destroy_key() Al Viro
2018-09-06 10:34 ` Jamal Hadi Salim
2018-09-05 19:04 ` [PATCH 5/7] get rid of tc_u_knode ->tp Al Viro
2018-09-06 10:35 ` Jamal Hadi Salim
2018-09-05 19:04 ` [PATCH 6/7] get rid of tc_u_common ->rcu Al Viro
2018-09-06 10:36 ` Jamal Hadi Salim
2018-09-07 4:18 ` Cong Wang
2018-09-07 4:28 ` Al Viro
2018-09-05 19:04 ` [PATCH 7/7] clean tc_u_common hashtable Al Viro
2018-09-06 10:36 ` Jamal Hadi Salim
2018-09-06 10:21 ` [PATCH 1/7] fix hnode refcounting Jamal Hadi Salim
2018-09-07 2:35 ` Al Viro
2018-09-07 12:13 ` Jamal Hadi Salim
2018-09-07 12:33 ` Jamal Hadi Salim
2018-09-08 15:03 ` Al Viro [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180908150340.GC19965@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=netdev@vger.kernel.org \
--cc=stable@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.