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

Tejun Heo
2024-12-18T16:39:35Z

On Wed, Dec 18, 2024 at 08:01:32AM +0800, Zijun Hu wrote:
> From: Zijun Hu <quic_zijuhu@quicinc.com>
>
> 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@suse.com>
> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
> Cc: stable@vger.kernel.org
> Signed-off-by: Zijun Hu <quic_zijuhu@quicinc.com>

Acked-by: Tejun Heo <tj@kernel.org>

Thanks.

--
tejun