From: Yazen Ghannam <yazen.ghannam@amd.com>
To: Charles Han <hanchunchao@inspur.com>
Cc: rafael@kernel.org, tony.luck@intel.com, bp@alien8.de,
guohanjun@huawei.com, mchehab@kernel.org,
xueshuai@linux.alibaba.com, lenb@kernel.org, ira.weiny@intel.com,
zaidal@os.amperecomputing.com, Jonathan.Cameron@huawei.com,
colin.i.king@gmail.com, dan.carpenter@linaro.org,
dan.j.williams@intel.com, sudeep.holla@arm.com,
linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ACPI: APEI: EINJ: fix potential NULL dereference in __einj_error_inject
Date: Tue, 19 Aug 2025 10:04:11 -0400 [thread overview]
Message-ID: <20250819140411.GA389101@yaz-khff2.amd.com> (raw)
In-Reply-To: <20250815024207.3038-1-hanchunchao@inspur.com>
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@inspur.com>
Reviewed-by: Yazen Ghannam <yazen.ghannam@amd.com>
Thanks,
Yazen
prev parent reply other threads:[~2025-08-19 14:04 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-15 2:42 Charles Han
2025-08-15 15:51 ` Luck, Tony
2025-08-18 16:06 ` Hanjun Guo
2025-08-18 16:11 ` Rafael J. Wysocki
2025-08-19 14:04 ` Yazen Ghannam [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250819140411.GA389101@yaz-khff2.amd.com \
--to=yazen.ghannam@amd.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=bp@alien8.de \
--cc=colin.i.king@gmail.com \
--cc=dan.carpenter@linaro.org \
--cc=dan.j.williams@intel.com \
--cc=guohanjun@huawei.com \
--cc=hanchunchao@inspur.com \
--cc=ira.weiny@intel.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mchehab@kernel.org \
--cc=rafael@kernel.org \
--cc=sudeep.holla@arm.com \
--cc=tony.luck@intel.com \
--cc=xueshuai@linux.alibaba.com \
--cc=zaidal@os.amperecomputing.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®