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] [thread-next>] [day] [month] [year] [list]
Message-ID: <793d9ca8-47af-2f3d-6079-e0bbb8e7d898@collabora.com>
Date:   Thu, 25 Aug 2022 21:53:09 +0300
From:   Dmitry Osipenko <dmitry.osipenko@...labora.com>
To:     Shreeya Patel <shreeya.patel@...labora.com>, jic23@...nel.org,
        lars@...afoo.de
Cc:     krisman@...labora.com, kernel@...labora.com,
        linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iio: light: tsl2583: Fix module unloading

Hi,

On 8/25/22 12:20, Shreeya Patel wrote:
> tsl2583 uses devm_iio_device_register() function and
> calling iio_device_unregister() in remove breaks the
> module unloading.
> Fix this by removing call to iio_device_unregister()
> from tsl2583_remove().
> 
> Signed-off-by: Shreeya Patel <shreeya.patel@...labora.com>

Stable and fixes tags are missing

> ---
>  drivers/iio/light/tsl2583.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/iio/light/tsl2583.c b/drivers/iio/light/tsl2583.c
> index 82662dab87c0..36c25f79e6a6 100644
> --- a/drivers/iio/light/tsl2583.c
> +++ b/drivers/iio/light/tsl2583.c
> @@ -878,8 +878,6 @@ static int tsl2583_remove(struct i2c_client *client)
>  	struct iio_dev *indio_dev = i2c_get_clientdata(client);
>  	struct tsl2583_chip *chip = iio_priv(indio_dev);
>  
> -	iio_device_unregister(indio_dev);
> -
>  	pm_runtime_disable(&client->dev);
>  	pm_runtime_set_suspended(&client->dev);
>  

Driver removal sequence should be opposite to the registration order.
Could be better not to use the devm in this case.

-- 
Best regards,
Dmitry

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ