lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <sb7dgl6e22jsskvtiqvfny64pdxfxuyijcj2zxc46s27kwecfw@xqyutig7nlem>
Date: Tue, 18 Mar 2025 16:51:52 +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 RESEND v2] blk-cgroup: improve policy registration error
 handling

On Mon, Mar 17, 2025 at 10:29:24AM +0800, Chen Linxuan <chenlinxuan@...ontech.com> wrote:
> This patch improve the returned error code of blkcg_policy_register().
> 
> 1. 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.
> 
>    Those locks should not contention any problems, as error of policy
>    registration is a super cold path.
> 
> 2. Return -ENOMEM when cpd_alloc_fn() failed.
> 
> Co-authored-by: Wen Tao <wentao@...ontech.com>
> Signed-off-by: Wen Tao <wentao@...ontech.com>
> Signed-off-by: Chen Linxuan <chenlinxuan@...ontech.com>
> ---
>  block/blk-cgroup.c | 22 ++++++++++++----------
>  1 file changed, 12 insertions(+), 10 deletions(-)

Reviewed-by: Michal Koutný <mkoutny@...e.com>

Download attachment "signature.asc" of type "application/pgp-signature" (229 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ