Commit ec495f2
committed
KVM: Write the per-page "segment" when clearing (part of) a guest page
Pass "seg" instead of "len" when writing guest memory in kvm_clear_guest(),
as "seg" holds the number of bytes to write for the current page, while
"len" holds the total bytes remaining.
Luckily, all users of kvm_clear_guest() are guaranteed to not cross a page
boundary, and so the bug is unhittable in the current code base.
Fixes: 2f54144 ("KVM: remove kvm_clear_guest_page")
Reported-by: [email protected]
Closes: https://bugzilla.kernel.org/show_bug.cgi?id=219104
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>1 parent e027ba1 commit ec495f2
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3581 | 3581 | | |
3582 | 3582 | | |
3583 | 3583 | | |
3584 | | - | |
| 3584 | + | |
3585 | 3585 | | |
3586 | 3586 | | |
3587 | 3587 | | |
| |||
0 commit comments