[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <167104700802.18171.11122547200509229739.b4-ty@kernel.dk>
Date: Wed, 14 Dec 2022 12:43:28 -0700
From: Jens Axboe <axboe@...nel.dk>
To: Tejun Heo <tj@...nel.org>
Cc: linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
darklight2357@...oud.com, Josef Bacik <josef@...icpanda.com>,
Linus Torvalds <torvalds@...ux-foundation.org>,
cgroups@...r.kernel.org
Subject: Re: (subset) [PATCH 1/2 block/for-6.2] blk-iolatency: Fix memory leak
on add_disk() failures
On Sat, 10 Dec 2022 08:33:10 -1000, Tejun Heo wrote:
> When a gendisk is successfully initialized but add_disk() fails such as when
> a loop device has invalid number of minor device numbers specified,
> blkcg_init_disk() is called during init and then blkcg_exit_disk() during
> error handling. Unfortunately, iolatency gets initialized in the former but
> doesn't get cleaned up in the latter.
>
> This is because, in non-error cases, the cleanup is performed by
> del_gendisk() calling rq_qos_exit(), the assumption being that rq_qos
> policies, iolatency being one of them, can only be activated once the disk
> is fully registered and visible. That assumption is true for wbt and iocost,
> but not so for iolatency as it gets initialized before add_disk() is called.
>
> [...]
Applied, thanks!
[1/2] blk-iolatency: Fix memory leak on add_disk() failures
commit: 813e693023ba10da9e75067780f8378465bf27cc
Best regards,
--
Jens Axboe
Powered by blists - more mailing lists