diff mbox

[v2] arm: virt: Fix the segmentation fault when specifying an unsupported CPU

Message ID 1484619334-10488-1-git-send-email-zhaoshenglong@huawei.com
State New
Headers show

Commit Message

Shannon Zhao Jan. 17, 2017, 2:15 a.m. UTC
From: Shannon Zhao <shannon.zhao@linaro.org>

For example, using -cpu generic will cause qemu segmentation fault.

Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
---
V2: Just remove the member NULL instead of checking twice
---
 hw/arm/virt.c | 1 -
 1 file changed, 1 deletion(-)

Comments

Peter Maydell Jan. 17, 2017, 11:43 a.m. UTC | #1
On 17 January 2017 at 02:15, Shannon Zhao <zhaoshenglong@huawei.com> wrote:
> From: Shannon Zhao <shannon.zhao@linaro.org>
>
> For example, using -cpu generic will cause qemu segmentation fault.
>
> Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
> ---
> V2: Just remove the member NULL instead of checking twice
> ---
>  hw/arm/virt.c | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/hw/arm/virt.c b/hw/arm/virt.c
> index 7a03f84..95ac585 100644
> --- a/hw/arm/virt.c
> +++ b/hw/arm/virt.c
> @@ -167,7 +167,6 @@ static const char *valid_cpus[] = {
>      "cortex-a53",
>      "cortex-a57",
>      "host",
> -    NULL
>  };
>
>  static bool cpuname_valid(const char *cpu)

Applied to target-arm.next (with some expansion of the commit
message), thanks.

-- PMM
diff mbox

Patch

diff --git a/hw/arm/virt.c b/hw/arm/virt.c
index 7a03f84..95ac585 100644
--- a/hw/arm/virt.c
+++ b/hw/arm/virt.c
@@ -167,7 +167,6 @@  static const char *valid_cpus[] = {
     "cortex-a53",
     "cortex-a57",
     "host",
-    NULL
 };
 
 static bool cpuname_valid(const char *cpu)