Skip to contentSkip to conversation

kvm: fix typo of || to && in arch/x86/kvm/vmx.c

PATCH In review Wei Yongjun 2 participants 2 messages Feb 17, 2009

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 kvm: fix typo of || to && in arch/x86/kvm/vmx.c

Fix the typo of || to &&.

---
 arch/x86/kvm/vmx.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/vmx.c +2 -2
index 6259d74..3f3cab2 100644
@@ -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;
@@ -1856,7 +1856,7 @@ static bool tr_valid(struct kvm_vcpu *vcpu)
 
 	if (tr.selector & SELECTOR_TI_MASK)	/* TI = 1 */
 		return false;
-	if ((tr.type != 3) || (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */
+	if ((tr.type != 3) && (tr.type != 11)) /* TODO: Check if guest is in IA32e mode */
 		return false;
 	if (!tr.present)
 		return false;
Signature · 1 line
1.5.3.8
#1 lore raw
Quoted 3 lines · Wei Yongjun

Fix the typo of || to &&.

This is already fixed in kvm.git.

Signature · 2 lines
I have a truly marvellous patch that fixes the bug which this
signature is too narrow to contain.