Loading
ACPI: APEI: EINJ: fix potential NULL dereference in __einj_error_inject()
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: b4761029 ("ACPI: APEI: EINJ: Enable EINJv2 error injections") Signed-off-by:Charles Han <hanchunchao@inspur.com> Reviewed-by:
Tony Luck <tony.luck@intel.com> Reviewed-by:
Hanjun Guo <guohanjun@huawei.com> Link: https://patch.msgid.link/20250815024207.3038-1-hanchunchao@inspur.com Signed-off-by:
Rafael J. Wysocki <rafael.j.wysocki@intel.com>