kvm: ||/&& typo
PATCH 1/1 kvm: ||/&& typo
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 <[email protected]>
---
arch/x86/kvm/vmx.c +1 -1
@@ -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;
Quoted 2 lines · Roel Kluin
This was also reported by Jörg-Volker Peetz here:
http://lkml.org/lkml/2009/2/16/325
Please use this one, It gives Jörg-Volker Peetz credits, and I missed another issue just below.
------------------->8---------------------8<----------------------- Since ss.type is always either not 3 or not 7.
Reported-by Jörg-Volker Peetz <[email protected]>
Signed-off-by Roel Kluin <[email protected]>
---
arch/x86/kvm/vmx.c +2 -2
@@ -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;
Quoted 10 lines · Roel Kluin
Quoted 3 lines · Roel Kluin
This was also reported by Jörg-Volker Peetz here:
http://lkml.org/lkml/2009/2/16/325Please use this one, It gives Jörg-Volker Peetz credits, and I missed another issue just below.
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.