[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20201217110531.6fd60fe5@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date: Thu, 17 Dec 2020 11:05:31 -0800
From: Jakub Kicinski <kuba@...nel.org>
To: Davide Caratti <dcaratti@...hat.com>
Cc: Jamal Hadi Salim <jhs@...atatu.com>,
Cong Wang <xiyou.wangcong@...il.com>,
Jiri Pirko <jiri@...nulli.us>,
"David S. Miller" <davem@...emloft.net>,
Vinicius Costa Gomes <vinicius.gomes@...el.com>,
netdev@...r.kernel.org
Subject: Re: [PATCH net] net/sched: sch_taprio: reset child qdiscs before
freeing them
On Wed, 16 Dec 2020 19:33:29 +0100 Davide Caratti wrote:
> + if (q->qdiscs) {
> + for (i = 0; i < dev->num_tx_queues && q->qdiscs[i]; i++)
> + qdisc_reset(q->qdiscs[i]);
Are you sure that we can't graft a NULL in the middle of the array?
Shouldn't this be:
for (i = 0; i < dev->num_tx_queues; i++)
if (q->qdiscs[i])
qdisc_reset(q->qdiscs[i]);
?
If this is a problem it already exists in destroy so I'll apply anyway.
Powered by blists - more mailing lists