]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commit
irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices
authorMarc Zyngier <maz@kernel.org>
Thu, 5 Sep 2019 13:56:47 +0000 (14:56 +0100)
committerKhalid Elmously <khalid.elmously@canonical.com>
Fri, 18 Oct 2019 08:25:59 +0000 (04:25 -0400)
commitab2a93d7c5439ba24da63ea5dd852ea238a82e85
treec9a72c099213a0bc57f12230658a20fcb7f21a34
parentd29f03d31e0da1590cd75aefb909ed111c1927b7
irqchip/gic-v3-its: Fix LPI release for Multi-MSI devices

BugLink: https://bugs.launchpad.net/bugs/1848046
[ Upstream commit c9c96e30ecaa0aafa225aa1a5392cb7db17c7a82 ]

When allocating a range of LPIs for a Multi-MSI capable device,
this allocation extended to the closest power of 2.

But on the release path, the interrupts are released one by
one. This results in not releasing the "extra" range, leaking
the its_device. Trying to reprobe the device will then fail.

Fix it by releasing the LPIs the same way we allocate them.

Fixes: 8208d1708b88 ("irqchip/gic-v3-its: Align PCI Multi-MSI allocation on their size")
Reported-by: Jiaxing Luo <luojiaxing@huawei.com>
Tested-by: John Garry <john.garry@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/f5e948aa-e32f-3f74-ae30-31fee06c2a74@huawei.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
drivers/irqchip/irq-gic-v3-its.c