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: <Z_PZp4pL8MVS_QMv@kuha.fi.intel.com>
Date: Mon, 7 Apr 2025 16:56:55 +0300
From: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
To: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
	linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/2] usb: typec: tcpci: Fix wakeup source leaks on device
 unbind

On Sun, Apr 06, 2025 at 10:40:50PM +0200, Krzysztof Kozlowski wrote:
> Device can be unbound, so driver must also release memory for the wakeup
> source.
> 
> Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>

I this should be marked as a fix. In any case, FWIW:

Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>

> ---
>  drivers/usb/typec/tcpm/tcpci_maxim_core.c | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/usb/typec/tcpm/tcpci_maxim_core.c b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> index fd1b80593367..29a4aa89d1a1 100644
> --- a/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> +++ b/drivers/usb/typec/tcpm/tcpci_maxim_core.c
> @@ -536,7 +536,10 @@ static int max_tcpci_probe(struct i2c_client *client)
>  		return dev_err_probe(&client->dev, ret,
>  				     "IRQ initialization failed\n");
>  
> -	device_init_wakeup(chip->dev, true);
> +	ret = devm_device_init_wakeup(chip->dev);
> +	if (ret)
> +		return dev_err_probe(chip->dev, ret, "Failed to init wakeup\n");
> +
>  	return 0;
>  }
>  
> -- 
> 2.45.2

-- 
heikki

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ