lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <dc06bb07-6411-219f-9094-4bc2161dbc14@redhat.com>
Date:   Mon, 15 Jan 2018 14:32:06 +0100
From:   Paolo Bonzini <pbonzini@...hat.com>
To:     David Binderman <dcb314@...mail.com>,
        "rkrcmar@...hat.com" <rkrcmar@...hat.com>,
        "tglx@...utronix.de" <tglx@...utronix.de>,
        "mingo@...hat.com" <mingo@...hat.com>,
        "hpa@...or.com" <hpa@...or.com>, "x86@...nel.org" <x86@...nel.org>,
        "kvm@...r.kernel.org" <kvm@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: arch/x86/kvm/x86.c:7111:23: warning: this statement may fall
 through [-Wimplicit-fallthrough=]

On 15/01/2018 13:34, David Binderman wrote:
> Hello there,
> 
> 
> Source code is
> 
> 
>     switch(vcpu->arch.mp_state) {
>     case KVM_MP_STATE_HALTED:
>         vcpu->arch.pv.pv_unhalted = false;
>         vcpu->arch.mp_state =
>             KVM_MP_STATE_RUNNABLE;
>     case KVM_MP_STATE_RUNNABLE:
>         vcpu->arch.apf.halted = false;
>         break;
> 
> Suggest either add the missing break or add a fallthrough comment.

It's meant to be a fall-through to the "runnable" case (note that
mp_state becomes KVM_MP_STATE_RUNNABLE at the end of the first "case").

Would you like to post a patch yourself?

Thanks,

Paolo

> 
> 
> Regards
> 
> 
> David Binderman
> 
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ