Commit 1442ee0
irqchip/gic-v4: Don't allow a VMOVP on a dying VPE
Kunkun Jiang reported that there is a small window of opportunity for
userspace to force a change of affinity for a VPE while the VPE has already
been unmapped, but the corresponding doorbell interrupt still visible in
/proc/irq/.
Plug the race by checking the value of vmapp_count, which tracks whether
the VPE is mapped ot not, and returning an error in this case.
This involves making vmapp_count common to both GICv4.1 and its v4.0
ancestor.
Fixes: 64edfaa ("irqchip/gic-v4.1: Implement the v4.1 flavour of VMAPP")
Reported-by: Kunkun Jiang <jiangkunkun@huawei.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/c182ece6-2ba0-ce4f-3404-dba7a3ab6c52@huawei.com
Link: https://lore.kernel.org/all/20241002204959.2051709-1-maz@kernel.org1 parent 6eabf65 commit 1442ee0
File tree
2 files changed
+15
-7
lines changed- drivers/irqchip
- include/linux/irqchip
2 files changed
+15
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
797 | 797 | | |
798 | 798 | | |
799 | 799 | | |
| 800 | + | |
800 | 801 | | |
801 | | - | |
802 | 802 | | |
803 | 803 | | |
804 | 804 | | |
| |||
817 | 817 | | |
818 | 818 | | |
819 | 819 | | |
| 820 | + | |
| 821 | + | |
820 | 822 | | |
821 | 823 | | |
822 | 824 | | |
823 | 825 | | |
824 | 826 | | |
825 | | - | |
826 | | - | |
827 | 827 | | |
828 | 828 | | |
829 | 829 | | |
| |||
3806 | 3806 | | |
3807 | 3807 | | |
3808 | 3808 | | |
| 3809 | + | |
| 3810 | + | |
| 3811 | + | |
| 3812 | + | |
| 3813 | + | |
| 3814 | + | |
| 3815 | + | |
3809 | 3816 | | |
3810 | 3817 | | |
3811 | 3818 | | |
| |||
4463 | 4470 | | |
4464 | 4471 | | |
4465 | 4472 | | |
4466 | | - | |
4467 | | - | |
4468 | | - | |
| 4473 | + | |
| 4474 | + | |
4469 | 4475 | | |
4470 | 4476 | | |
4471 | 4477 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
69 | | - | |
70 | 69 | | |
71 | 70 | | |
72 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments