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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 15 Jun 2022 20:29:03 +0200
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     Bo Liu <liubo03@...pur.com>, viro@...iv.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] eventfd: Directly use ida_alloc()/free()

Le 15/06/2022 à 08:03, Bo Liu a écrit :
> Use ida_alloc()/ida_free() instead of
> ida_simple_get()/ida_simple_remove().
> The latter is deprecated and more verbose.
> 
> Signed-off-by: Bo Liu <liubo03@...pur.com>

Hi,
for what it's worth:

Reviewed-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

> ---
>   fs/eventfd.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/eventfd.c b/fs/eventfd.c
> index 3627dd7d25db..e17a2ea53da9 100644
> --- a/fs/eventfd.c
> +++ b/fs/eventfd.c
> @@ -89,7 +89,7 @@ EXPORT_SYMBOL_GPL(eventfd_signal);
>   static void eventfd_free_ctx(struct eventfd_ctx *ctx)
>   {
>   	if (ctx->id >= 0)
> -		ida_simple_remove(&eventfd_ida, ctx->id);
> +		ida_free(&eventfd_ida, ctx->id);
>   	kfree(ctx);
>   }
>   
> @@ -423,7 +423,7 @@ static int do_eventfd(unsigned int count, int flags)
>   	init_waitqueue_head(&ctx->wqh);
>   	ctx->count = count;
>   	ctx->flags = flags;
> -	ctx->id = ida_simple_get(&eventfd_ida, 0, 0, GFP_KERNEL);
> +	ctx->id = ida_alloc(&eventfd_ida, GFP_KERNEL);
>   
>   	flags &= EFD_SHARED_FCNTL_FLAGS;
>   	flags |= O_RDWR;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ