]> www.infradead.org Git - users/jedix/linux-maple.git/commit
KVM: selftests: Read per-page value into local var when verifying dirty_log_test
authorSean Christopherson <seanjc@google.com>
Sat, 11 Jan 2025 00:29:50 +0000 (16:29 -0800)
committerSean Christopherson <seanjc@google.com>
Wed, 12 Feb 2025 17:00:55 +0000 (09:00 -0800)
commitf2228aa083240f44794c3617d4a22134ab26217c
tree7b3fe49d3935d016b73624ce31ec2214fe4bf369
parentaf2d85d34d158c4ab49e1d41c19a100ee83c148a
KVM: selftests: Read per-page value into local var when verifying dirty_log_test

Cache the page's value during verification in a local variable, re-reading
from the pointer is ugly and error prone, e.g. allows for bugs like
checking the pointer itself instead of the value.

No functional change intended.

Reviewed-by: Maxim Levitsky <mlevitsk@redhat.com>
Link: https://lore.kernel.org/r/20250111003004.1235645-7-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>
tools/testing/selftests/kvm/dirty_log_test.c