From: Eric Dumazet Date: Tue, 4 Jan 2022 17:04:39 +0000 (-0800) Subject: net/sched: add missing tracker information in qdisc_create() X-Git-Tag: block-5.17-2022-01-21~91^2~58 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=88248c357c2a8dbff899770dc02e2edf89d989aa;p=linux-block.git 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: 606509f27f67 ("net/sched: add net device refcount tracker to struct Qdisc") Signed-off-by: Eric Dumazet Link: https://lore.kernel.org/r/20220104170439.3790052-1-eric.dumazet@gmail.com Signed-off-by: Jakub Kicinski --- diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index efcd0b5e9a32..c9c6f49f9c28 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c @@ -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);