[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CANn89iL4RLjcJH8s4HAUoSa4cxAztkhx-4rsUZ2xwY8tYbPcCg@mail.gmail.com>
Date: Wed, 12 Jan 2022 05:06:49 -0800
From: Eric Dumazet <edumazet@...gle.com>
To: Maxim Mikityanskiy <maximmi@...dia.com>
Cc: Eric Dumazet <eric.dumazet@...il.com>,
"David S. Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
Tariq Toukan <tariqt@...dia.com>,
netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH] sch_api: Don't skip qdisc attach on ingress
On Wed, Jan 12, 2022 at 2:28 AM Maxim Mikityanskiy <maximmi@...dia.com> wrote:
>
> The attach callback of struct Qdisc_ops is used by only a few qdiscs:
> mq, mqprio and htb. qdisc_graft() contains the following logic
> (pseudocode):
>
> if (!qdisc->ops->attach) {
> if (ingress)
> do ingress stuff;
> else
> do egress stuff;
> }
> if (!ingress) {
> ...
> if (qdisc->ops->attach)
> qdisc->ops->attach(qdisc);
> } else {
> ...
> }
>
> unregister_netdevice: waiting for lo to become free. Usage count = 2
>
> This commit addresses the issue by running "do ingress stuff" in the
> ingress flow even in the attach callback is present, which is fine,
> because attach isn't going to be called afterwards.
>
> The bug was found by syzbot and reported by Eric.
>
> Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload")
> Signed-off-by: Maxim Mikityanskiy <maximmi@...dia.com>
> Reported-by: Eric Dumazet <edumazet@...gle.com>
> ---
Thanks for fixing this issue.
Reviewed-by: Eric Dumazet <edumazet@...gle.com>
Powered by blists - more mailing lists