diff options
author | Radim Krčmář <rkrcmar@redhat.com> | 2018-01-06 17:26:37 +0100 |
---|---|---|
committer | Radim Krčmář <rkrcmar@redhat.com> | 2018-01-06 17:26:37 +0100 |
commit | bb4945e60dd0b5afb0e92bc8006ce560948fbc39 (patch) | |
tree | f36c0f1d00219c376d8ce3ada92e32ba0ec97eb9 /arch/s390/kvm/priv.c | |
parent | 0cb5b30698fdc8f6b4646012e3acb4ddce430788 (diff) | |
parent | c2cf265d860882b51a200e4a7553c17827f2b730 (diff) | |
download | blackbird-op-linux-bb4945e60dd0b5afb0e92bc8006ce560948fbc39.tar.gz blackbird-op-linux-bb4945e60dd0b5afb0e92bc8006ce560948fbc39.zip |
Merge tag 'kvm-s390-master-4.15-2' of git://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux
KVM: s390: fixes for cmma migration
Two fixes for potential bitmap overruns in the cmma migration
code.
Diffstat (limited to 'arch/s390/kvm/priv.c')
-rw-r--r-- | arch/s390/kvm/priv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/s390/kvm/priv.c b/arch/s390/kvm/priv.c index 572496c688cc..0714bfa56da0 100644 --- a/arch/s390/kvm/priv.c +++ b/arch/s390/kvm/priv.c @@ -1006,7 +1006,7 @@ static inline int do_essa(struct kvm_vcpu *vcpu, const int orc) cbrlo[entries] = gfn << PAGE_SHIFT; } - if (orc) { + if (orc && gfn < ms->bitmap_size) { /* increment only if we are really flipping the bit to 1 */ if (!test_and_set_bit(gfn, ms->pgste_bitmap)) atomic64_inc(&ms->dirty_pages); |