Skip to content

Commit c28275e

Browse files
committed
Merge tag 'irq-urgent-2024-04-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull irq fix from Ingo Molnar: "Fix a bug in the GIC irqchip driver" * tag 'irq-urgent-2024-04-14' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: irqchip/gic-v3-its: Fix VSYNC referencing an unmapped VPE on GIC v4.1
2 parents 399f4da + 80e9963 commit c28275e

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

drivers/irqchip/irq-gic-v3-its.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
786786
struct its_cmd_block *cmd,
787787
struct its_cmd_desc *desc)
788788
{
789+
struct its_vpe *vpe = valid_vpe(its, desc->its_vmapp_cmd.vpe);
789790
unsigned long vpt_addr, vconf_addr;
790791
u64 target;
791792
bool alloc;
@@ -798,6 +799,11 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
798799
if (is_v4_1(its)) {
799800
alloc = !atomic_dec_return(&desc->its_vmapp_cmd.vpe->vmapp_count);
800801
its_encode_alloc(cmd, alloc);
802+
/*
803+
* Unmapping a VPE is self-synchronizing on GICv4.1,
804+
* no need to issue a VSYNC.
805+
*/
806+
vpe = NULL;
801807
}
802808

803809
goto out;
@@ -832,7 +838,7 @@ static struct its_vpe *its_build_vmapp_cmd(struct its_node *its,
832838
out:
833839
its_fixup_cmd(cmd);
834840

835-
return valid_vpe(its, desc->its_vmapp_cmd.vpe);
841+
return vpe;
836842
}
837843

838844
static struct its_vpe *its_build_vmapti_cmd(struct its_node *its,

0 commit comments

Comments
 (0)