All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marcel Apfelbaum <marcel@redhat.com>
To: Iwona Kotlarska <iwona260909@gmail.com>
Cc: qemu-devel@nongnu.org, pbonzini@redhat.com, rth@twiddle.net,
	ehabkost@redhat.com
Subject: Re: [Qemu-devel] [PATCH v3] hmp: fix "info cpu" segfault
Date: Thu, 30 Mar 2017 13:32:45 +0300	[thread overview]
Message-ID: <e0025b06-b26d-d168-8894-0f246e1c37f0@redhat.com> (raw)
In-Reply-To: <20170330050924.22134-1-iwona260909@gmail.com>

On 03/30/2017 08:09 AM, Iwona Kotlarska wrote:
> Running QEMU with "qemu-system-x86_64 -M none -nographic -m 256" and executing
> "dump-guest-memory /dev/null 0 8192" results in segfault.
> Fix by checking if we have CPU.
>
> Signed-off-by: Iwona Kotlarska <iwona260909@gmail.com>
> ---

Hi Iwona,

Next time (this patch is OK) please add here,
after the "---" line a quick info on the version changes, e.g. :

v2 -> v3:
   - Addressed Eduardo's comment and didn't split the assignment.
   - ...

v1-> v2:


   - ....

>  target/i386/arch_dump.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/target/i386/arch_dump.c b/target/i386/arch_dump.c
> index 5a2e4be5d0..fe0aa36932 100644
> --- a/target/i386/arch_dump.c
> +++ b/target/i386/arch_dump.c
> @@ -391,8 +391,7 @@ int cpu_get_dump_info(ArchDumpInfo *info,
>
>  #ifdef TARGET_X86_64
>      X86CPU *first_x86_cpu = X86_CPU(first_cpu);
> -
> -    lma = !!(first_x86_cpu->env.hflags & HF_LMA_MASK);
> +    lma = first_cpu && (first_x86_cpu->env.hflags & HF_LMA_MASK);
>  #endif
>
>      if (lma) {
>

Reviewed-by: Marcel Apfelbaum <marcel@redhat.com>

Thanks,
Marcel

  parent reply	other threads:[~2017-03-30 10:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-30  5:09 [Qemu-devel] [PATCH v3] hmp: fix "info cpu" segfault Iwona Kotlarska
2017-03-30  9:55 ` Stefan Hajnoczi
2017-03-30 10:32 ` Marcel Apfelbaum [this message]
2017-03-30 14:28 ` Eduardo Habkost
2017-03-30 14:37   ` Paolo Bonzini
2017-03-30 14:38     ` Dr. David Alan Gilbert
2017-03-31 10:01 ` Dr. David Alan Gilbert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=e0025b06-b26d-d168-8894-0f246e1c37f0@redhat.com \
    --to=marcel@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=iwona260909@gmail.com \
    --cc=pbonzini@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=rth@twiddle.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.