diff mbox

kvm: ||/&& typo

Message ID 499ACE6B.6020407@gmail.com (mailing list archive)
State Accepted, archived
Headers show

Commit Message

Roel Kluin Feb. 17, 2009, 2:49 p.m. UTC
This was also reported by Jörg-Volker Peetz here:
http://lkml.org/lkml/2009/2/16/325
------------------->8---------------------8<-----------------------
Since ss.type is always either not 3 or not 7.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
---
--
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/x86/kvm/vmx.c b/arch/x86/kvm/vmx.c
index 6259d74..7c4cca1 100644
--- a/arch/x86/kvm/vmx.c
+++ b/arch/x86/kvm/vmx.c
@@ -1813,7 +1813,7 @@  static bool stack_segment_valid(struct kvm_vcpu *vcpu)
 	vmx_get_segment(vcpu, &ss, VCPU_SREG_SS);
 	ss_rpl = ss.selector & SELECTOR_RPL_MASK;
 
-	if ((ss.type != 3) || (ss.type != 7))
+	if ((ss.type != 3) && (ss.type != 7))
 		return false;
 	if (!ss.s)
 		return false;