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] [day] [month] [year] [list]
Message-ID: <b01e8c0d-8847-48d5-b198-ae000fdb2b20@ideasonboard.com>
Date: Tue, 10 Dec 2024 10:04:16 +0200
From: Tomi Valkeinen <tomi.valkeinen@...asonboard.com>
To: Wolfram Sang <wsa@...nel.org>
Cc: linux-i2c@...r.kernel.org, linux-kernel@...r.kernel.org,
 Mauro Carvalho Chehab <mchehab@...nel.org>,
 Cosmin Tanislav <demonsingur@...il.com>,
 Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>,
 stable@...r.kernel.org, Luca Ceresoli <luca.ceresoli@...tlin.com>,
 Wolfram Sang <wsa+renesas@...g-engineering.com>,
 Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
 Sakari Ailus <sakari.ailus@...ux.intel.com>
Subject: Re: [PATCH v2 1/3] i2c: atr: Fix client detach

Hi Wolfram,

On 22/11/2024 14:26, Tomi Valkeinen wrote:
> From: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
> 
> i2c-atr catches the BUS_NOTIFY_DEL_DEVICE event on the bus and removes
> the translation by calling i2c_atr_detach_client().
> 
> However, BUS_NOTIFY_DEL_DEVICE happens when the device is about to be
> removed from this bus, i.e. before removal, and thus before calling
> .remove() on the driver. If the driver happens to do any i2c
> transactions in its remove(), they will fail.
> 
> Fix this by catching BUS_NOTIFY_REMOVED_DEVICE instead, thus removing
> the translation only after the device is actually removed.
> 
> Fixes: a076a860acae ("media: i2c: add I2C Address Translator (ATR) support")
> Cc: stable@...r.kernel.org
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen+renesas@...asonboard.com>
> ---
>   drivers/i2c/i2c-atr.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/i2c/i2c-atr.c b/drivers/i2c/i2c-atr.c
> index f21475ae5921..0d54d0b5e327 100644
> --- a/drivers/i2c/i2c-atr.c
> +++ b/drivers/i2c/i2c-atr.c
> @@ -412,7 +412,7 @@ static int i2c_atr_bus_notifier_call(struct notifier_block *nb,
>   				dev_name(dev), ret);
>   		break;
>   
> -	case BUS_NOTIFY_DEL_DEVICE:
> +	case BUS_NOTIFY_REMOVED_DEVICE:
>   		i2c_atr_detach_client(client->adapter, client);
>   		break;
>   
> 

Can you pick this one up (ignore the two other patches in this series), 
or should I send it as a separate patch?

  Tomi


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ