Commit 88248c35 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski

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

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

Fixes: 606509f2 ("net/sched: add net device refcount tracker to struct Qdisc")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220104170439.3790052-1-eric.dumazet@gmail.comSigned-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c487b653
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment