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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CY8PR11MB7134B091C68A84EFD5CBD9ED89F82@CY8PR11MB7134.namprd11.prod.outlook.com>
Date: Tue, 4 Jun 2024 02:39:42 +0000
From: "Zhuo, Qiuxu" <qiuxu.zhuo@...el.com>
To: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>, "Luck,
 Tony" <tony.luck@...el.com>, Borislav Petkov <bp@...en8.de>, James Morse
	<james.morse@....com>, Mauro Carvalho Chehab <mchehab@...nel.org>, "Robert
 Richter" <rric@...nel.org>, "linux-edac@...r.kernel.org"
	<linux-edac@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>
CC: "stable@...r.kernel.org" <stable@...r.kernel.org>
Subject: RE: [PATCH 2/2] EDAC/igen6: Convert PCIBIOS_* return codes to errnos

> From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> [...]
> Subject: [PATCH 2/2] EDAC/igen6: Convert PCIBIOS_* return codes to errnos
> 
> errcmd_enable_error_reporting() uses pci_{read,write}_config_word() that
> return PCIBIOS_* codes. The return code is then returned all the way into the
> probe function igen6_probe() that returns it as is. The probe functions,
> however, should return normal errnos.
> 
> Convert PCIBIOS_* returns code using pcibios_err_to_errno() into normal
> errno before returning it from errcmd_enable_error_reporting().
> 
> Fixes: 10590a9d4f23 ("EDAC/igen6: Add EDAC driver for Intel client SoCs using
> IBECC")
> Cc: stable@...r.kernel.org
> Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
> ---
>  drivers/edac/igen6_edac.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/edac/igen6_edac.c b/drivers/edac/igen6_edac.c index
> cdd8480e7368..dbe9fe5f2ca6 100644
> --- a/drivers/edac/igen6_edac.c
> +++ b/drivers/edac/igen6_edac.c
> @@ -800,7 +800,7 @@ static int errcmd_enable_error_reporting(bool
> enable)
> 
>  	rc = pci_read_config_word(imc->pdev, ERRCMD_OFFSET, &errcmd);
>  	if (rc)
> -		return rc;
> +		return pcibios_err_to_errno(rc);
> 
>  	if (enable)
>  		errcmd |= ERRCMD_CE | ERRSTS_UE;
> @@ -809,7 +809,7 @@ static int errcmd_enable_error_reporting(bool
> enable)
> 
>  	rc = pci_write_config_word(imc->pdev, ERRCMD_OFFSET, errcmd);
>  	if (rc)
> -		return rc;
> +		return pcibios_err_to_errno(rc);
> 
>  	return 0;
>  }
> --
> 2.39.2

Reviewed-by: Qiuxu Zhuo <qiuxu.zhuo@...el.com>

Thanks!


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ