]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
KVM: x86: fix incorrect comparison in trace event
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 13 Feb 2020 17:24:48 +0000 (18:24 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 1 Oct 2020 11:12:35 +0000 (13:12 +0200)
[ Upstream commit 147f1a1fe5d7e6b01b8df4d0cbd6f9eaf6b6c73b ]

The "u" field in the event has three states, -1/0/1.  Using u8 however means that
comparison with -1 will always fail, so change to signed char.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
arch/x86/kvm/mmutrace.h

index 918b0d5bf2724c66953addcc6b0bfd5b776c6c45..1c1c2649829ba9476d9866efe060304f8784937d 100644 (file)
@@ -339,7 +339,7 @@ TRACE_EVENT(
                /* These depend on page entry type, so compute them now.  */
                __field(bool, r)
                __field(bool, x)
-               __field(u8, u)
+               __field(signed char, u)
        ),
 
        TP_fast_assign(