]> git.baikalelectronics.ru Git - kernel.git/commit
KVM: Fix the bitmap range to copy during clear dirty
authorPeter Xu <peterx@redhat.com>
Wed, 8 May 2019 09:15:45 +0000 (17:15 +0800)
committerPaolo Bonzini <pbonzini@redhat.com>
Wed, 8 May 2019 11:42:53 +0000 (13:42 +0200)
commit7d66820d3b4478c61561a2475a5d24067b75ff8d
tree84c5b7a326c8d083289afe89f410a78c6c73d3fd
parent47dc86cb9b57a4c58864776de0a5b0a9a1525cc2
KVM: Fix the bitmap range to copy during clear dirty

kvm_dirty_bitmap_bytes() will return the size of the dirty bitmap of
the memslot rather than the size of bitmap passed over from the ioctl.
Here for KVM_CLEAR_DIRTY_LOG we should only copy exactly the size of
bitmap that covers kvm_clear_dirty_log.num_pages.

Signed-off-by: Peter Xu <peterx@redhat.com>
Cc: stable@vger.kernel.org
Fixes: 9da8aba7bd713d8cfc5a99bd3686be0641cdc7ee
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
virt/kvm/kvm_main.c