diff options
author | Yang Yingliang <yangyingliang@huawei.com> | 2022-10-17 06:23:33 +0300 |
---|---|---|
committer | Michael Ellerman <mpe@ellerman.id.au> | 2022-11-24 15:31:49 +0300 |
commit | 8b49670f3bb3f10cd4d5a6dca17f5a31b173ecdc (patch) | |
tree | 0926564bcfc6d973fcc449dcb4ada79a74dde75a /arch/powerpc/sysdev | |
parent | 579aee9fc594af94c242068c011b0233563d4bbf (diff) | |
download | linux-8b49670f3bb3f10cd4d5a6dca17f5a31b173ecdc.tar.xz |
powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()
If remapping 'data->trig_page' fails, the 'data->eoi_mmio' need be unmapped
before returning from xive_spapr_populate_irq_data().
Fixes: eac1e731b59e ("powerpc/xive: guest exploitation of the XIVE interrupt controller")
Signed-off-by: Yang Yingliang <yangyingliang@huawei.com>
Reviewed-by: Cédric Le Goater <clg@kaod.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221017032333.1852406-1-yangyingliang@huawei.com
Diffstat (limited to 'arch/powerpc/sysdev')
-rw-r--r-- | arch/powerpc/sysdev/xive/spapr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/powerpc/sysdev/xive/spapr.c b/arch/powerpc/sysdev/xive/spapr.c index e2c8f93b535b..e45419264391 100644 --- a/arch/powerpc/sysdev/xive/spapr.c +++ b/arch/powerpc/sysdev/xive/spapr.c @@ -439,6 +439,7 @@ static int xive_spapr_populate_irq_data(u32 hw_irq, struct xive_irq_data *data) data->trig_mmio = ioremap(data->trig_page, 1u << data->esb_shift); if (!data->trig_mmio) { + iounmap(data->eoi_mmio); pr_err("Failed to map trigger page for irq 0x%x\n", hw_irq); return -ENOMEM; } |