提交 88248c35 编写于 作者: E Eric Dumazet 提交者: 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: NEric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220104170439.3790052-1-eric.dumazet@gmail.comSigned-off-by: NJakub Kicinski <kuba@kernel.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册