[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <i6owvzwb4pjg27tex5utdzcoyeeawqejegvc2byz6tnfn2flmh@2ggun5qyokvs>
Date: Tue, 11 Feb 2025 14:57:09 +0100
From: Michal Koutný <mkoutny@...e.com>
To: Chen Linxuan <chenlinxuan@...ontech.com>
Cc: Tejun Heo <tj@...nel.org>, Josef Bacik <josef@...icpanda.com>,
Jens Axboe <axboe@...nel.dk>, Wen Tao <wentao@...ontech.com>, cgroups@...r.kernel.org,
linux-block@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] blk-cgroup: validate alloc/free function pairs at the
start of blkcg_policy_register()
Hello Linxuan.
On Mon, Feb 10, 2025 at 11:18:27AM +0800, Chen Linxuan <chenlinxuan@...ontech.com> wrote:
> Move the validation check for cpd/pd_alloc_fn and cpd/pd_free_fn function
> pairs to the start of blkcg_policy_register(). This ensures we immediately
> return -EINVAL if the function pairs are not correctly provided, rather
> than returning -ENOSPC after locking and unlocking mutexes unnecessarily.
>
> Co-authored-by: Wen Tao <wentao@...ontech.com>
> Signed-off-by: Wen Tao <wentao@...ontech.com>
> Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
If you consider those locks contention a problem (policy registrations
are "only" boot time, possibly module load time), then it's good to refer
Fixes: e84010732225c ("blkcg: add sanity check for blkcg policy operations")
> ---
> block/blk-cgroup.c | 16 ++++++++--------
> 1 file changed, 8 insertions(+), 8 deletions(-)
But it's correct,
Reviewed-by: Michal Koutný <mkoutny@...e.com>
Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)
Powered by blists - more mailing lists