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: <477F20668A386D41ADCC57781B1F70430D1418CA15@SC-VEXCH1.marvell.com>
Date:	Fri, 25 Jan 2013 13:03:30 -0800
From:	Bing Zhao <bzhao@...vell.com>
To:	Alexey Khoroshilov <khoroshilov@...ras.ru>
CC:	"John W. Linville" <linville@...driver.com>,
	"linux-wireless@...r.kernel.org" <linux-wireless@...r.kernel.org>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"ldv-project@...uxtesting.org" <ldv-project@...uxtesting.org>
Subject: RE: [PATCH] mwifiex: don't return zero on failure paths in
 mwifiex_pcie_init()

Hi Alexey,

Thanks for the patch.

> If pci_iomap() fails in mwifiex_pcie_init(), it breaks off initialization,
> deallocates all resources, but returns zero.
> The patch adds -EIO as return value in this case.
> 
> Found by Linux Driver Verification project (linuxtesting.org).
> 
> Signed-off-by: Alexey Khoroshilov <khoroshilov@...ras.ru>

Acked-by: Bing Zhao <bzhao@...vell.com>

Thanks,
Bing

> ---
>  drivers/net/wireless/mwifiex/pcie.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/wireless/mwifiex/pcie.c b/drivers/net/wireless/mwifiex/pcie.c
> index 13fbc4e..9d9349c 100644
> --- a/drivers/net/wireless/mwifiex/pcie.c
> +++ b/drivers/net/wireless/mwifiex/pcie.c
> @@ -1739,6 +1739,7 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter)
>  	card->pci_mmap = pci_iomap(pdev, 0, 0);
>  	if (!card->pci_mmap) {
>  		dev_err(adapter->dev, "iomap(0) error\n");
> +		ret = -EIO;
>  		goto err_iomap0;
>  	}
>  	ret = pci_request_region(pdev, 2, DRV_NAME);
> @@ -1749,6 +1750,7 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter)
>  	card->pci_mmap1 = pci_iomap(pdev, 2, 0);
>  	if (!card->pci_mmap1) {
>  		dev_err(adapter->dev, "iomap(2) error\n");
> +		ret = -EIO;
>  		goto err_iomap2;
>  	}
> 
> --
> 1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ