]> git.baikalelectronics.ru Git - kernel.git/commit
irqchip/gic-v3-its: Fix potential VPE leak on error
authorKaige Fu <kaige.fu@linux.alibaba.com>
Wed, 15 Sep 2021 02:20:55 +0000 (10:20 +0800)
committerMarc Zyngier <maz@kernel.org>
Wed, 22 Sep 2021 13:37:04 +0000 (14:37 +0100)
commitb328fd1b12636efe07b0a4912b5726b35e8e8242
treef9e620c59ee81b6494132271fc2700efed9d0dc4
parentcfb5fadf4841105be18f105041f12bcec44891cc
irqchip/gic-v3-its: Fix potential VPE leak on error

In its_vpe_irq_domain_alloc, when its_vpe_init() returns an error,
there is an off-by-one in the number of VPEs to be freed.

Fix it by simply passing the number of VPEs allocated, which is the
index of the loop iterating over the VPEs.

Fixes: 4b4e61778439 ("irqchip/gic-v3-its: Add VPE irq domain allocation/teardown")
Signed-off-by: Kaige Fu <kaige.fu@linux.alibaba.com>
[maz: fixed commit message]
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/d9e36dee512e63670287ed9eff884a5d8d6d27f2.1631672311.git.kaige.fu@linux.alibaba.com
drivers/irqchip/irq-gic-v3-its.c