diff options
author | Nicholas Piggin <npiggin@gmail.com> | 2021-10-03 11:22:03 +1000 |
---|---|---|
committer | Vasant Hegde <hegdevasant@linux.vnet.ibm.com> | 2021-10-19 12:08:19 +0530 |
commit | 1f8cc710c830f8642d74f09392dbe106377fa1b1 (patch) | |
tree | b9a02d8661f8fee6e3026137e9e2463eb9847ae9 /hw | |
parent | ebef02621dedc111c9c75c98971fcb869b492052 (diff) | |
download | skiboot-1f8cc710c830f8642d74f09392dbe106377fa1b1.zip skiboot-1f8cc710c830f8642d74f09392dbe106377fa1b1.tar.gz skiboot-1f8cc710c830f8642d74f09392dbe106377fa1b1.tar.bz2 |
interrupts: add_opal_interrupts avoid NULL dereference on P10 mambo
On P10, get_ics_phandle() calls xive2_get_phandle() directly. This
results in a NULL dereference on mambo when xive2 is not set up.
This was caught with the virtual memory boot patch on P10 mambo.
Signed-off-by: Nicholas Piggin <npiggin@gmail.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Vasant Hegde <hegdevasant@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/xive2.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1977,6 +1977,9 @@ static void xive_create_mmio_dt_node(struct xive *x) uint32_t xive2_get_phandle(void) { + if (!xive_dt_node) + return 0; + return xive_dt_node->phandle; } |