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]
Message-ID: <YrGL0zLpdzGbcWE4@hovoldconsulting.com>
Date:   Tue, 21 Jun 2022 11:13:55 +0200
From:   Johan Hovold <johan@...nel.org>
To:     keliu <liuke94@...wei.com>
Cc:     vaibhav.sr@...il.com, mgreer@...malcreek.com, elder@...nel.org,
        gregkh@...uxfoundation.org, vireshk@...nel.org,
        pure.logic@...us-software.ie, greybus-dev@...ts.linaro.org,
        linux-staging@...ts.linux.dev, linux-kernel@...r.kernel.org
Subject: Re: [greybus-dev] [PATCH] staging: greybus: Directly use
 ida_alloc()/free()

On Fri, May 27, 2022 at 06:35:28AM +0000, keliu wrote:
> Use ida_alloc()/ida_free() instead of deprecated
> ida_simple_get()/ida_simple_remove() .
> 
> Signed-off-by: keliu <liuke94@...wei.com>

Is "keliu" really your full legal name?

> ---
>  drivers/staging/greybus/audio_manager.c  |  8 ++++----
>  drivers/staging/greybus/authentication.c |  4 ++--
>  drivers/staging/greybus/fw-download.c    |  4 ++--
>  drivers/staging/greybus/fw-management.c  | 12 ++++++------
>  drivers/staging/greybus/gbphy.c          |  4 ++--
>  drivers/staging/greybus/loopback.c       |  6 +++---
>  drivers/staging/greybus/raw.c            |  6 +++---
>  drivers/staging/greybus/vibrator.c       |  6 +++---
>  8 files changed, 25 insertions(+), 25 deletions(-)
 
> diff --git a/drivers/staging/greybus/authentication.c b/drivers/staging/greybus/authentication.c
> index 297e69f011c7..01dd1cd958ea 100644
> --- a/drivers/staging/greybus/authentication.c
> +++ b/drivers/staging/greybus/authentication.c
> @@ -348,7 +348,7 @@ int gb_cap_connection_init(struct gb_connection *connection)
>  err_del_cdev:
>  	cdev_del(&cap->cdev);
>  err_remove_ida:
> -	ida_simple_remove(&cap_minors_map, minor);
> +	ida_free(&cap_minors_map, minor);
>  err_connection_disable:
>  	gb_connection_disable(connection);
>  err_list_del:
> @@ -372,7 +372,7 @@ void gb_cap_connection_exit(struct gb_connection *connection)
>  
>  	device_destroy(cap_class, cap->dev_num);
>  	cdev_del(&cap->cdev);
> -	ida_simple_remove(&cap_minors_map, MINOR(cap->dev_num));
> +	ida_free(&cap_minors_map, MINOR(cap->dev_num));
>  
>  	/*
>  	 * Disallow any new ioctl operations on the char device and wait for

The above looks incomplete since you do not change the ida_simple_get()
in gb_cap_connection_init().

Please check for any similar mistakes throughout.

Johan

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ