Skip to contentSkip to conversation

KVM: x86: fix incorrect comparison in trace event

PATCH New Paolo Bonzini 1 participant 1 message Feb 13, 2020

Subsystems (3)
lore
Share & tools
lore

Paolo Bonzini

author maintainer
#0 lore raw

PATCH 1/1 KVM: x86: fix incorrect comparison in trace event

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.

---
 arch/x86/kvm/mmutrace.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kvm/mmutrace.h +1 -1
index 3c6522b84ff1..ffcd96fc02d0 100644
@@ -339,7 +339,7 @@
 		/* 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(
Signature · 1 line
1.8.3.1