[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YVwzgwrW0QttrbFv@dcaratti.users.ipa.redhat.com>
Date: Tue, 5 Oct 2021 13:14:11 +0200
From: Davide Caratti <dcaratti@...hat.com>
To: Eric Dumazet <eric.dumazet@...il.com>
Cc: "David S . Miller" <davem@...emloft.net>,
Jakub Kicinski <kuba@...nel.org>,
netdev <netdev@...r.kernel.org>,
Eric Dumazet <edumazet@...gle.com>,
syzbot <syzkaller@...glegroups.com>
Subject: Re: [PATCH net] net/sched: sch_taprio: properly cancel timer from
taprio_destroy()
hello Eric, thanks for the patch!
On Mon, Oct 04, 2021 at 12:55:22PM -0700, Eric Dumazet wrote:
> From: Eric Dumazet <edumazet@...gle.com>
>
> There is a comment in qdisc_create() about us not calling ops->reset()
> in some cases.
>
> err_out4:
> /*
> * Any broken qdiscs that would require a ops->reset() here?
> * The qdisc was never in action so it shouldn't be necessary.
> */
right, I didn't spot this error path.
> Fixes: 44d4775ca518 ("net/sched: sch_taprio: reset child qdiscs before freeing them")
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> Cc: Davide Caratti <dcaratti@...hat.com>
> Reported-by: syzbot <syzkaller@...glegroups.com>
Acked-by: Davide Caratti <dcaratti@...hat.com>
> ---
> net/sched/sch_taprio.c | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/net/sched/sch_taprio.c b/net/sched/sch_taprio.c
> index 1ab2fc933a214d04dfff763d2c5de65f4a67374a..b9fd18d986464f317a9fb7ce709a9728ffb75751 100644
> --- a/net/sched/sch_taprio.c
> +++ b/net/sched/sch_taprio.c
> @@ -1641,6 +1641,10 @@ static void taprio_destroy(struct Qdisc *sch)
> list_del(&q->taprio_list);
> spin_unlock(&taprio_list_lock);
>
> + /* Note that taprio_reset() might not be called if an error
> + * happens in qdisc_create(), after taprio_init() has been called.
> + */
> + hrtimer_cancel(&q->advance_timer);
>
> taprio_disable_offload(dev, q, NULL);
>
> --
> 2.33.0.800.g4c38ced690-goog
>
Powered by blists - more mailing lists