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: <b3665329-dbe9-d78d-a988-b7c346b069de@linux.intel.com>
Date: Thu, 29 Aug 2024 14:06:17 +0300 (EEST)
From: Ilpo Järvinen <ilpo.jarvinen@...ux.intel.com>
To: Xi Pardee <xi.pardee@...ux.intel.com>
cc: irenic.rajneesh@...il.com, david.e.box@...ux.intel.com, 
    Hans de Goede <hdegoede@...hat.com>, platform-driver-x86@...r.kernel.org, 
    LKML <linux-kernel@...r.kernel.org>, linux-pm@...r.kernel.org
Subject: Re: [PATCH v2 07/11] platform/x86:intel/pmc: Check return value of
 ioremap

On Wed, 28 Aug 2024, Xi Pardee wrote:

> Check the return value of ioremap operation and return ENOMEM when
> the operation fails for better error handling.
> 
> Signed-off-by: Xi Pardee <xi.pardee@...ux.intel.com>
> ---
>  drivers/platform/x86/intel/pmc/ssram_telemetry.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/platform/x86/intel/pmc/ssram_telemetry.c b/drivers/platform/x86/intel/pmc/ssram_telemetry.c
> index 73c727042ca6..f625d39d1aa3 100644
> --- a/drivers/platform/x86/intel/pmc/ssram_telemetry.c
> +++ b/drivers/platform/x86/intel/pmc/ssram_telemetry.c
> @@ -84,6 +84,9 @@ pmc_core_ssram_get_pmc(struct pmc_dev *pmcdev, unsigned int pmc_idx, u32 offset)
>  	ssram_base = ssram_pcidev->resource[0].start;
>  	tmp_ssram = ioremap(ssram_base, SSRAM_HDR_SIZE);
>  
> +	if (!tmp_ssram)
> +		return -ENOMEM;
> +
>  	if (pmc_idx != PMC_IDX_MAIN) {
>  		/*
>  		 * The secondary PMC BARS (which are behind hidden PCI devices)

Is this a fix to the current code? And should have Fixes tag and go 
first because of that?

-- 
 i.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ