diff options
author | Peter Zijlstra <peterz@infradead.org> | 2020-12-09 19:08:45 +0300 |
---|---|---|
committer | Peter Zijlstra <peterz@infradead.org> | 2020-12-09 19:08:45 +0300 |
commit | 2b3c99ee6389d33aff91d9e7a55465d7d1332bbd (patch) | |
tree | 9e1e5d839d80c95854007c958f2c367290bf1090 /arch/powerpc/kvm | |
parent | 97d62caa32d6d79dadae3f8d19af5c92ea9a589a (diff) | |
parent | 31784cff7ee073b34d6eddabb95e3be2880a425c (diff) | |
download | linux-2b3c99ee6389d33aff91d9e7a55465d7d1332bbd.tar.xz |
Merge branch 'locking/rwsem'
Diffstat (limited to 'arch/powerpc/kvm')
-rw-r--r-- | arch/powerpc/kvm/book3s_xive_native.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/arch/powerpc/kvm/book3s_xive_native.c b/arch/powerpc/kvm/book3s_xive_native.c index d0c2db0e07fa..a59a94f02733 100644 --- a/arch/powerpc/kvm/book3s_xive_native.c +++ b/arch/powerpc/kvm/book3s_xive_native.c @@ -251,6 +251,13 @@ static vm_fault_t xive_native_esb_fault(struct vm_fault *vmf) } state = &sb->irq_state[src]; + + /* Some sanity checking */ + if (!state->valid) { + pr_devel("%s: source %lx invalid !\n", __func__, irq); + return VM_FAULT_SIGBUS; + } + kvmppc_xive_select_irq(state, &hw_num, &xd); arch_spin_lock(&sb->lock); |