Commit 8e3f3c06 authored by Lorenzo Pieralisi's avatar Lorenzo Pieralisi Committed by Greg Kroah-Hartman
Browse files

ACPI/IORT: Fix iort_get_platform_device_domain() uninitialized pointer value

[ Upstream commit ea2412dc ]

Running the Clang static analyzer on IORT code detected the following

Logic error: Branch condition evaluates to a garbage value



If the named component associated with a given device has no IORT
mappings, iort_get_platform_device_domain() exits its MSI mapping loop
with msi_parent pointer containing garbage, which can lead to erroneous
code path execution.

Initialize the msi_parent pointer, fixing the bug.

Fixes: d4f54a18

 ("ACPI: platform: setup MSI domain for ACPI based
platform device")
Reported-by: default avatarPatrick Bellasi <>
Reviewed-by: default avatarHanjun Guo <>
Acked-by: default avatarWill Deacon <>
Cc: Sudeep Holla <>
Cc: "Rafael J. Wysocki" <>
Signed-off-by: default avatarLorenzo Pieralisi <>
Signed-off-by: default avatarCatalin Marinas <>
Signed-off-by: default avatarSasha Levin <>
parent 9407fd14
......@@ -547,7 +547,7 @@ struct irq_domain *iort_get_device_domain(struct device *dev, u32 req_id)
static struct irq_domain *iort_get_platform_device_domain(struct device *dev)
struct acpi_iort_node *node, *msi_parent;
struct acpi_iort_node *node, *msi_parent = NULL;
struct fwnode_handle *iort_fwnode;
struct acpi_iort_its_group *its;
int i;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment