Thread (7 messages) 7 messages, 3 authors, 2020-12-17

Re: [PATCH net] net/sched: sch_taprio: reset child qdiscs before freeing them

From: Jakub Kicinski <kuba@kernel.org>
Date: 2020-12-17 19:06:14

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help