[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250819140411.GA389101@yaz-khff2.amd.com>
Date: Tue, 19 Aug 2025 10:04:11 -0400
From: Yazen Ghannam <yazen.ghannam@....com>
To: Charles Han <hanchunchao@...pur.com>
Cc: rafael@...nel.org, tony.luck@...el.com, bp@...en8.de,
guohanjun@...wei.com, mchehab@...nel.org,
xueshuai@...ux.alibaba.com, lenb@...nel.org, ira.weiny@...el.com,
zaidal@...amperecomputing.com, Jonathan.Cameron@...wei.com,
colin.i.king@...il.com, dan.carpenter@...aro.org,
dan.j.williams@...el.com, sudeep.holla@....com,
linux-acpi@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] ACPI: APEI: EINJ: fix potential NULL dereference in
__einj_error_inject
On Fri, Aug 15, 2025 at 10:42:06AM +0800, Charles Han wrote:
> The __einj_error_inject() function allocates memory via kmalloc()
> without checking for allocation failure, which could lead to a
> NULL pointer dereference.
>
> Return -ENOMEM in case allocation fails.
>
> Fixes: b47610296d17 ("ACPI: APEI: EINJ: Enable EINJv2 error injections")
> Signed-off-by: Charles Han <hanchunchao@...pur.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@....com>
Thanks,
Yazen
Powered by blists - more mailing lists