[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210923195612.25949-1-vgomonovych@marvell.com>
Date: Thu, 23 Sep 2021 12:56:10 -0700
From: Vasyl Gomonovych <vgomonovych@...vell.com>
To: <rafael@...nel.org>, <lenb@...nel.org>, <james.morse@....com>
CC: Vasyl Gomonovych <vgomonovych@...vell.com>,
Tony Luck <tony.luck@...el.com>,
Borislav Petkov <bp@...en8.de>,
Randy Dunlap <rdunlap@...radead.org>,
Yazen Ghannam <yazen.ghannam@....com>,
"Robert Richter" <rrichter@....com>,
Tom Saeger <tom.saeger@...cle.com>,
<linux-acpi@...r.kernel.org>, <linux-kernel@...r.kernel.org>
Subject: [PATCH] ACPI: APEI: Check NULL argument in exported symbol
Exported symbol apei_hest_parse is external API
and should check pointer argument
Signed-off-by: Vasyl Gomonovych <vgomonovych@...vell.com>
---
drivers/acpi/apei/hest.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/acpi/apei/hest.c b/drivers/acpi/apei/hest.c
index 277f00b288d1..9f5c334c7c88 100644
--- a/drivers/acpi/apei/hest.c
+++ b/drivers/acpi/apei/hest.c
@@ -91,7 +91,7 @@ int apei_hest_parse(apei_hest_func_t func, void *data)
struct acpi_hest_header *hest_hdr;
int i, rc, len;
- if (hest_disable || !hest_tab)
+ if (hest_disable || !hest_tab || !func)
return -EINVAL;
hest_hdr = (struct acpi_hest_header *)(hest_tab + 1);
--
2.17.1
Powered by blists - more mailing lists