]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
KVM: Fix kvm_clear_dirty_log_protect off-by-(minus-)one
authorPeter Xu <peterx@redhat.com>
Wed, 8 May 2019 09:15:46 +0000 (17:15 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 May 2019 11:43:28 +0000 (13:43 +0200)
commit53eac7a8f8cf3d7dc5ecac1946f31442f5eee5f3
treeea638c4eda3b0e85c23b5a28342e5f028a3dacdf
parent4ddc9204572c33f2eb91fbdb1d99d8078388b67d
KVM: Fix kvm_clear_dirty_log_protect off-by-(minus-)one

Just imaging the case where num_pages < BITS_PER_LONG, then the loop
will be skipped while it shouldn't.

Signed-off-by: Peter Xu <peterx@redhat.com>
Fixes: 2a31b9db153530df4aa02dac8c32837bf5f47019
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c