[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <157425606350.12247.12564301811344536817.tip-bot2@tip-bot2>
Date: Wed, 20 Nov 2019 13:21:03 -0000
From: "tip-bot2 for Marc Zyngier" <tip-bot2@...utronix.de>
To: linux-tip-commits@...r.kernel.org
Cc: Marc Zyngier <maz@...nel.org>, Ingo Molnar <mingo@...nel.org>,
Borislav Petkov <bp@...en8.de>, linux-kernel@...r.kernel.org
Subject: [tip: irq/core] irqchip/gic-v3-its: Lock VLPI map array before translating it
The following commit has been merged into the irq/core branch of tip:
Commit-ID: 046b5054f56691c7f5861197a812f3990f66b30e
Gitweb: https://git.kernel.org/tip/046b5054f56691c7f5861197a812f3990f66b30e
Author: Marc Zyngier <maz@...nel.org>
AuthorDate: Fri, 08 Nov 2019 16:58:04
Committer: Marc Zyngier <maz@...nel.org>
CommitterDate: Sun, 10 Nov 2019 18:48:30
irqchip/gic-v3-its: Lock VLPI map array before translating it
Obtaining the mapping ivformation for a VLPI should always be
done with the vlpi_lock for this device held. Otherwise, we
expose ourselves to races against a concurrent unmap.
Signed-off-by: Marc Zyngier <maz@...nel.org>
Link: https://lore.kernel.org/r/20191108165805.3071-11-maz@kernel.org
---
drivers/irqchip/irq-gic-v3-its.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/irqchip/irq-gic-v3-its.c b/drivers/irqchip/irq-gic-v3-its.c
index 61b8851..9c4f35e 100644
--- a/drivers/irqchip/irq-gic-v3-its.c
+++ b/drivers/irqchip/irq-gic-v3-its.c
@@ -1492,12 +1492,14 @@ out:
static int its_vlpi_get(struct irq_data *d, struct its_cmd_info *info)
{
struct its_device *its_dev = irq_data_get_irq_chip_data(d);
- struct its_vlpi_map *map = get_vlpi_map(d);
+ struct its_vlpi_map *map;
int ret = 0;
mutex_lock(&its_dev->event_map.vlpi_lock);
- if (!its_dev->event_map.vm || !map->vm) {
+ map = get_vlpi_map(d);
+
+ if (!its_dev->event_map.vm || !map) {
ret = -EINVAL;
goto out;
}
Powered by blists - more mailing lists