Skip to contentSkip to conversation

net/sched: add missing tracker information in qdisc_create()

PATCH Applied Eric Dumazet 2 participants 2 messages Jan 4, 2022 – Jan 5, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 net/sched: add missing tracker information in qdisc_create()

From: Eric Dumazet <[email protected]>

qdisc_create() error path needs to use dev_put_track() because qdisc_alloc() allocated the tracker.

Fixes 606509f27f67 ("net/sched: add net device refcount tracker to struct Qdisc")
---
 net/sched/sch_api.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/sched/sch_api.c +1 -1
index efcd0b5e9a323bfc19a0ac09e8e4c357170029fb..c9c6f49f9c284f57b2f3e637160e37af2b125dbb 100644
@@ -1292,7 +1292,7 @@ static struct Qdisc *qdisc_create(struct net_device *dev,
 	if (ops->destroy)
 		ops->destroy(sch);
 err_out3:
-	dev_put(dev);
+	dev_put_track(dev, &sch->dev_tracker);
 	qdisc_free(sch);
 err_out2:
 	module_put(ops->owner);
Signature · 1 line
2.34.1.448.ga2b2bfdf31-goog
#1 lore raw
This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Hello:

This patch was applied to netdev/net-next.git (master) by Jakub Kicinski <[email protected]>:

Quoted 9 lines · On Tue, 4 Jan 2022 09:04:39 -0800 you wrote:

From: Eric Dumazet <[email protected]>

qdisc_create() error path needs to use dev_put_track() because qdisc_alloc() allocated the tracker.

Fixes 606509f27f67 ("net/sched: add net device refcount tracker to struct Qdisc")

[...]

Here is the summary with links:
- [net-next] net/sched: add missing tracker information in qdisc_create()

    https://git.kernel.org/netdev/net-next/c/88248c357c2a

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html