Xiyu Yang c660701258 net: sched: Fix qdisc_rate_table refcount leak when get tcf_block failed
The reference counting issue happens in one exception handling path of
cbq_change_class(). When failing to get tcf_block, the function forgets
to decrease the refcount of "rtab" increased by qdisc_put_rtab(),
causing a refcount leak.

Fix this issue by jumping to "failure" label when get tcf_block failed.

Fixes: 6529eaba33f0 ("net: sched: introduce tcf block infractructure")
Signed-off-by: Xiyu Yang <xiyuyang19@fudan.edu.cn>
Reviewed-by: Cong Wang <cong.wang@bytedance.com>
Link: https://lore.kernel.org/r/1630252681-71588-1-git-send-email-xiyuyang19@fudan.edu.cn
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2021-08-30 20:29:03 -07:00
..
2021-06-02 14:01:55 -07:00
2021-07-27 20:11:45 +01:00
2021-08-03 11:21:39 +01:00
2021-08-05 13:27:50 +01:00
2021-06-30 15:51:09 -07:00
2021-06-29 11:28:21 -07:00
2021-05-26 07:03:39 +02:00
2021-06-07 14:08:30 -07:00
2021-08-05 13:27:50 +01:00
2021-08-13 14:09:19 -07:00
2021-06-03 15:13:56 -07:00
2021-07-29 15:06:49 +01:00
2021-07-29 15:06:49 +01:00
2021-07-29 15:06:49 +01:00