[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors
From: |
Andreas Färber |
Subject: |
Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors |
Date: |
Wed, 25 Feb 2015 23:23:45 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 |
Am 25.02.2015 um 20:58 schrieb Eduardo Habkost:
> This was the only caller of cpu_init() that was not checking for NULL
> yet.
>
> Reviewed-by: Paolo Bonzini <address@hidden>
> Signed-off-by: Eduardo Habkost <address@hidden>
> ---
> linux-user/main.c | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
> diff --git a/linux-user/main.c b/linux-user/main.c
> index d92702a..111c1ff 100644
> --- a/linux-user/main.c
> +++ b/linux-user/main.c
> @@ -3453,10 +3453,17 @@ CPUArchState *cpu_copy(CPUArchState *env)
> {
> CPUState *cpu = ENV_GET_CPU(env);
> CPUArchState *new_env = cpu_init(cpu_model);
> - CPUState *new_cpu = ENV_GET_CPU(new_env);
> + CPUState *new_cpu;
> CPUBreakpoint *bp;
> CPUWatchpoint *wp;
>
> + if (!new_env) {
> + fprintf(stderr, "cpu_copy: Failed to create new CPU\n");
> + exit(1);
> + }
> +
> + new_cpu = ENV_GET_CPU(new_env);
> +
> /* Reset non arch specific state */
> cpu_reset(new_cpu);
>
This one seems a genuine bug fix independent of your remodeling.
I would've expected that to go through Riku's/Peter's or my qom-cpu
tree, with Cc: address@hidden
Regards,
Andreas
--
SUSE Linux GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Felix Imendörffer, Jane Smithard, Jennifer Guild, Dilip Upmanyu,
Graham Norton; HRB 21284 (AG Nürnberg)
- Re: [Qemu-devel] [PULL 04/11] target-i386: Rename cpu_x86_init() to cpu_x86_init_user(), (continued)
[Qemu-devel] [PULL 02/11] target-i386: Eliminate unnecessary get_cpuid_vendor() function, Eduardo Habkost, 2015/02/25
[Qemu-devel] [PULL 05/11] target-i386: Eliminate cpu_init() function, Eduardo Habkost, 2015/02/25
[Qemu-devel] [PULL 06/11] target-i386: Simplify error handling on cpu_x86_init_user(), Eduardo Habkost, 2015/02/25
[Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Eduardo Habkost, 2015/02/25
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors,
Andreas Färber <=
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Peter Maydell, 2015/02/25
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Eduardo Habkost, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Peter Maydell, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Eduardo Habkost, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Peter Maydell, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Eduardo Habkost, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Peter Maydell, 2015/02/26
- Re: [Qemu-devel] [PULL 08/11] linux-user: Check for cpu_init() errors, Eduardo Habkost, 2015/02/27
[Qemu-devel] [PULL 07/11] target-i386: Move CPUX86State.cpuid_apic_id to X86CPU.apic_id, Eduardo Habkost, 2015/02/25
[Qemu-devel] [PULL 09/11] target-i386: Set APIC ID using cpu_index on CONFIG_USER, Eduardo Habkost, 2015/02/25