Commit 2f61880d authored by Daniil Tatianin's avatar Daniil Tatianin Committed by sanglipeng
Browse files

ACPICA: nsrepair: handle cases without a return value correctly

stable inclusion
from stable-v5.10.173
commit 5419cd28c8f29ccb347b5adbda1c2acc967700e6
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I8BFR3

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=5419cd28c8f29ccb347b5adbda1c2acc967700e6

--------------------------------

[ Upstream commit ca843a4c ]

Previously acpi_ns_simple_repair() would crash if expected_btypes
contained any combination of ACPI_RTYPE_NONE with a different type,
e.g | ACPI_RTYPE_INTEGER because of slightly incorrect logic in the
!return_object branch, which wouldn't return AE_AML_NO_RETURN_VALUE
for such cases.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Link: https://github.com/acpica/acpica/pull/811


Fixes: 61db45ca ("ACPICA: Restore code that repairs NULL package elements in return values.")
Signed-off-by: default avatarDaniil Tatianin <d-tatianin@yandex-team.ru>
Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent d97d5cd6
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment