[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAM_iQpUyh6BMTWAKNV3=TAQwRfj0M3TVatELvn32njSE6Y8DSg@mail.gmail.com>
Date: Thu, 30 Apr 2020 18:09:25 -0700
From: Cong Wang <xiyou.wangcong@...il.com>
To: Linux Kernel Network Developers <netdev@...r.kernel.org>
Cc: Jamal Hadi Salim <jhs@...atatu.com>, Jiri Pirko <jiri@...nulli.us>
Subject: Re: [Patch net] net_sched: fix tcm_parent in tc filter dump
On Thu, Apr 30, 2020 at 6:02 PM Cong Wang <xiyou.wangcong@...il.com> wrote:
> diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c
> index 55bd1429678f..80e93c96d2b2 100644
> --- a/net/sched/cls_api.c
> +++ b/net/sched/cls_api.c
> @@ -2612,12 +2612,10 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
> return skb->len;
>
> parent = tcm->tcm_parent;
> - if (!parent) {
> + if (!parent)
> q = dev->qdisc;
> - parent = q->handle;
> - } else {
> + else
> q = qdisc_lookup(dev, TC_H_MAJ(tcm->tcm_parent));
> - }
> if (!q)
> goto out;
> cops = q->ops->cl_ops;
> @@ -2633,6 +2631,7 @@ static int tc_dump_tfilter(struct sk_buff *skb, struct netlink_callback *cb)
> block = cops->tcf_block(q, cl, NULL);
> if (!block)
> goto out;
> + parent = block->q->handle;
Hmm, block->q could be NULL, I think I should just use q->handle
here.
Powered by blists - more mailing lists