diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-28 10:37:21 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-08-28 10:37:21 -0700 |
commit | 9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5 (patch) | |
tree | eb8af4cbe71eb8b6b8428a078abcbff8cc27a29e /virt/kvm/arm/vgic/vgic.c | |
parent | 9e8312f5e160ade069e131d54ab8652cf0e86e1a (diff) | |
parent | 82e40f558de566fdee214bec68096bbd5e64a6a4 (diff) | |
download | linux-9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5.tar.gz linux-9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5.tar.bz2 linux-9cf6b756cdf2cd38b8b0dac2567f7c6daf5e79d5.zip |
Merge tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux
Pull arm64 fixes from Will Deacon:
"Hot on the heels of our last set of fixes are a few more for -rc7.
Two of them are fixing issues with our virtual interrupt controller
implementation in KVM/arm, while the other is a longstanding but
straightforward kallsyms fix which was been acked by Masami and
resolves an initialisation failure in kprobes observed on arm64.
- Fix GICv2 emulation bug (KVM)
- Fix deadlock in virtual GIC interrupt injection code (KVM)
- Fix kprobes blacklist init failure due to broken kallsyms lookup"
* tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
KVM: arm/arm64: vgic-v2: Handle SGI bits in GICD_I{S,C}PENDR0 as WI
KVM: arm/arm64: vgic: Fix potential deadlock when ap_list is long
kallsyms: Don't let kallsyms_lookup_size_offset() fail on retrieving the first symbol
Diffstat (limited to 'virt/kvm/arm/vgic/vgic.c')
-rw-r--r-- | virt/kvm/arm/vgic/vgic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/virt/kvm/arm/vgic/vgic.c b/virt/kvm/arm/vgic/vgic.c index 13d4b38a94ec..e7bde65ba67c 100644 --- a/virt/kvm/arm/vgic/vgic.c +++ b/virt/kvm/arm/vgic/vgic.c @@ -254,6 +254,13 @@ static int vgic_irq_cmp(void *priv, struct list_head *a, struct list_head *b) bool penda, pendb; int ret; + /* + * list_sort may call this function with the same element when + * the list is fairly long. + */ + if (unlikely(irqa == irqb)) + return 0; + raw_spin_lock(&irqa->irq_lock); raw_spin_lock_nested(&irqb->irq_lock, SINGLE_DEPTH_NESTING); |