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: Thu, 8 Feb 2024 15:36:41 -0600
From: Bjorn Helgaas <helgaas@...nel.org>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
Cc: Kurt Schwemmer <kurt.schwemmer@...rosemi.com>,
	Logan Gunthorpe <logang@...tatee.com>,
	Bjorn Helgaas <bhelgaas@...gle.com>,
	Dmitry Safonov <0x7f454c46@...il.com>,
	Daniel Stodden <dns@...sta.com>, linux-kernel@...r.kernel.org,
	kernel-janitors@...r.kernel.org, linux-pci@...r.kernel.org
Subject: Re: [PATCH] PCI: switchtec: Fix an error handling path in
 switchtec_pci_probe()

On Sun, Dec 24, 2023 at 03:30:01PM +0100, Christophe JAILLET wrote:
> The commit in Fixes changed the logic on how resources are released and
> introduced a new switchtec_exit_pci() that need to be called explicitly in
> order to undo a corresponding switchtec_init_pci().
> 
> This was done in the remove function, but not in the probe.
> 
> Fix the probe now.
> 
> Fixes: df25461119d9 ("PCI: switchtec: Fix stdev_release() crash after surprise hot remove")
> Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>

Applied to pci/switchtec for v6.9, thanks!

> ---
>  drivers/pci/switch/switchtec.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/pci/switch/switchtec.c b/drivers/pci/switch/switchtec.c
> index 1804794d0e68..5a4adf6c04cf 100644
> --- a/drivers/pci/switch/switchtec.c
> +++ b/drivers/pci/switch/switchtec.c
> @@ -1672,7 +1672,7 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
>  	rc = switchtec_init_isr(stdev);
>  	if (rc) {
>  		dev_err(&stdev->dev, "failed to init isr.\n");
> -		goto err_put;
> +		goto err_exit_pci;
>  	}
>  
>  	iowrite32(SWITCHTEC_EVENT_CLEAR |
> @@ -1693,6 +1693,8 @@ static int switchtec_pci_probe(struct pci_dev *pdev,
>  
>  err_devadd:
>  	stdev_kill(stdev);
> +err_exit_pci:
> +	switchtec_exit_pci(stdev);
>  err_put:
>  	ida_free(&switchtec_minor_ida, MINOR(stdev->dev.devt));
>  	put_device(&stdev->dev);
> -- 
> 2.34.1
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ