Commit 95a88f43 authored by Peter Xu's avatar Peter Xu Committed by zhengchuan
Browse files

KVM: Fix kvm_clear_dirty_log_protect off-by-(minus-)one

mainline inclusion
from mainline-v5.10
commit: 53eac7a8
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I66COX
CVE: NA

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=53eac7a8f8cf3d7dc5ecac1946f31442f5eee5f3



--------------------------------

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

Signed-off-by: default avatarPeter Xu <peterx@redhat.com>
Fixes: 2a31b9db
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 6022f129
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment