diff mbox

[Bug,?] Qemu segfault because of non-initial kvm_state variable

Message ID 54F588D7.6060804@redhat.com
State New
Headers show

Commit Message

Paolo Bonzini March 3, 2015, 10:11 a.m. UTC
On 03/03/2015 09:01, Gonglei (Arei) wrote:
> Hi,
> 
> I encountered a Qemu segfault problem in my environment. 
> 
> # ./qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -name redhat6.2 -drive file=/home/win2008_ent_r2_64_01,\
>  if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -vnc :10 
> Segmentation fault

Should be fixed by:


Paolo

Comments

Peter Maydell March 3, 2015, 10:21 a.m. UTC | #1
On 3 March 2015 at 19:11, Paolo Bonzini <pbonzini@redhat.com> wrote:
>
>
> On 03/03/2015 09:01, Gonglei (Arei) wrote:
>> Hi,
>>
>> I encountered a Qemu segfault problem in my environment.
>>
>> # ./qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -name redhat6.2 -drive file=/home/win2008_ent_r2_64_01,\
>>  if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -vnc :10
>> Segmentation fault
>
> Should be fixed by:
>
> diff --git a/kvm-all.c b/kvm-all.c
> index 05a79c2..e04a0ca 100644
> --- a/kvm-all.c
> +++ b/kvm-all.c
> @@ -1679,7 +1679,7 @@ void kvm_flush_coalesced_mmio_buffer(void)
>  {
>      KVMState *s = kvm_state;
>
> -    if (s->coalesced_flush_in_progress) {
> +    if (!s || s->coalesced_flush_in_progress) {
>          return;
>      }

Is it worth my holding off on applying further pullreqs til
we apply this fix to master (in the interests of future
bisectability), or does it not affect many people/configs?

-- PMM
Paolo Bonzini March 3, 2015, 10:37 a.m. UTC | #2
On 03/03/2015 11:21, Peter Maydell wrote:
> On 3 March 2015 at 19:11, Paolo Bonzini <pbonzini@redhat.com> wrote:
>>
>>
>> On 03/03/2015 09:01, Gonglei (Arei) wrote:
>>> Hi,
>>>
>>> I encountered a Qemu segfault problem in my environment.
>>>
>>> # ./qemu-system-x86_64 -enable-kvm -m 4096 -smp 4 -name redhat6.2 -drive file=/home/win2008_ent_r2_64_01,\
>>>  if=none,id=drive-ide0-0-0 -device ide-hd,bus=ide.0,unit=0,drive=drive-ide0-0-0,id=ide0-0-0 -vnc :10
>>> Segmentation fault
>>
>> Should be fixed by:
>>
>> diff --git a/kvm-all.c b/kvm-all.c
>> index 05a79c2..e04a0ca 100644
>> --- a/kvm-all.c
>> +++ b/kvm-all.c
>> @@ -1679,7 +1679,7 @@ void kvm_flush_coalesced_mmio_buffer(void)
>>  {
>>      KVMState *s = kvm_state;
>>
>> -    if (s->coalesced_flush_in_progress) {
>> +    if (!s || s->coalesced_flush_in_progress) {
>>          return;
>>      }
> 
> Is it worth my holding off on applying further pullreqs til
> we apply this fix to master (in the interests of future
> bisectability), or does it not affect many people/configs?

I've sent the patch as message-id
1425378961-9600-1-git-send-email-pbonzini@redhat.com now.  You can apply
it directly or I can send a pull request.

However, the patch depends on my other pending pull request ("[PULL
00/15] Misc changes for 2015-03-02").

Paolo
diff mbox

Patch

diff --git a/kvm-all.c b/kvm-all.c
index 05a79c2..e04a0ca 100644
--- a/kvm-all.c
+++ b/kvm-all.c
@@ -1679,7 +1679,7 @@  void kvm_flush_coalesced_mmio_buffer(void)
 {
     KVMState *s = kvm_state;

-    if (s->coalesced_flush_in_progress) {
+    if (!s || s->coalesced_flush_in_progress) {
         return;
     }