]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net/sched: add missing tracker information in qdisc_create()
authorEric Dumazet <edumazet@google.com>
Tue, 4 Jan 2022 17:04:39 +0000 (09:04 -0800)
committerJakub Kicinski <kuba@kernel.org>
Wed, 5 Jan 2022 17:47:37 +0000 (09:47 -0800)
qdisc_create() error path needs to use dev_put_track()
because qdisc_alloc() allocated the tracker.

Fixes: fd3836506c3a ("net/sched: add net device refcount tracker to struct Qdisc")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Link: https://lore.kernel.org/r/20220104170439.3790052-1-eric.dumazet@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/sched/sch_api.c

index efcd0b5e9a323bfc19a0ac09e8e4c357170029fb..c9c6f49f9c284f57b2f3e637160e37af2b125dbb 100644 (file)
@@ -1292,7 +1292,7 @@ err_out5:
        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);