Re: [PATCH v4 2/8] blk-cgroup: Fix class @block_class's subsystem refcount leakage

From: Tejun Heo
Date: Wed Dec 18 2024 - 11:39:51 EST


On Wed, Dec 18, 2024 at 08:01:32AM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>
>
> blkcg_fill_root_iostats() iterates over @block_class's devices by
> class_dev_iter_(init|next)(), but does not end iterating with
> class_dev_iter_exit(), so causes the class's subsystem refcount leakage.
>
> Fix by ending the iterating with class_dev_iter_exit().
>
> Fixes: ef45fe470e1e ("blk-cgroup: show global disk stats in root cgroup io.stat")
> Reviewed-by: Michal Koutný <mkoutny@xxxxxxxx>
> Cc: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Zijun Hu <quic_zijuhu@xxxxxxxxxxx>

Acked-by: Tejun Heo <tj@xxxxxxxxxx>

Thanks.

--
tejun