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:   Wed, 6 Apr 2022 13:06:27 +0200
From:   Jiri Slaby <jirislaby@...nel.org>
To:     Huang Guobin <huangguobin4@...wei.com>, gregkh@...uxfoundation.org
Cc:     linux-serial@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tty: Fix a possible resource leak in icom_probe

On 31. 03. 22, 11:10, Huang Guobin wrote:
> When pci_read_config_dword failed, call pci_release_regions() and
> pci_disable_device() to recycle the resource previously allocated.

Reviewed-by: Jiri Slaby <jirislaby@...nel.org>


> Signed-off-by: Huang Guobin <huangguobin4@...wei.com>
> ---
>   drivers/tty/serial/icom.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/tty/serial/icom.c b/drivers/tty/serial/icom.c
> index 03a2fe9f4c9a..02b375ba2f07 100644
> --- a/drivers/tty/serial/icom.c
> +++ b/drivers/tty/serial/icom.c
> @@ -1501,7 +1501,7 @@ static int icom_probe(struct pci_dev *dev,
>   	retval = pci_read_config_dword(dev, PCI_COMMAND, &command_reg);
>   	if (retval) {
>   		dev_err(&dev->dev, "PCI Config read FAILED\n");
> -		return retval;
> +		goto probe_exit0;
>   	}
>   
>   	pci_write_config_dword(dev, PCI_COMMAND,


-- 
js
suse labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ