Thread (4 messages) flat view 4 messages, 4 authors, 2021-10-05

Re: [PATCH net] net/sched: sch_taprio: properly cancel timer from taprio_destroy()

From: Davide Caratti <hidden>
Date: 2021-10-05 11:14:17

hello Eric, thanks for the patch!

On Mon, Oct 04, 2021 at 12:55:22PM -0700, Eric Dumazet wrote:
From: Eric Dumazet <edumazet@google.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@google.com>
Cc: Davide Caratti <redacted>
Reported-by: syzbot <redacted>

Acked-by: Davide Caratti <redacted>
quoted hunk ↗ jump to hunk
---
 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
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help