qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size
@ 2021-04-07 22:30 Philippe Mathieu-Daudé
  2021-04-07 22:57 ` Richard Henderson
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-04-07 22:30 UTC (permalink / raw)
  To: qemu-devel; +Cc: Philippe Mathieu-Daudé, Yoshinori Sato

We check the amount of RAM is enough, warn when it is
not, but if so we neglect to bail out. Fix that by
adding the missing exit() call.

Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 hw/rx/rx-gdbsim.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
index b1d7c2488ff..4e4ececae4b 100644
--- a/hw/rx/rx-gdbsim.c
+++ b/hw/rx/rx-gdbsim.c
@@ -93,6 +93,7 @@ static void rx_gdbsim_init(MachineState *machine)
         char *sz = size_to_str(mc->default_ram_size);
         error_report("Invalid RAM size, should be more than %s", sz);
         g_free(sz);
+        exit(1);
     }
 
     /* Allocate memory space */
-- 
2.26.3



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size
  2021-04-07 22:30 [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size Philippe Mathieu-Daudé
@ 2021-04-07 22:57 ` Richard Henderson
  2021-04-09 14:01 ` Yoshinori Sato
  2021-05-02 16:27 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 5+ messages in thread
From: Richard Henderson @ 2021-04-07 22:57 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel; +Cc: Yoshinori Sato

On 4/7/21 3:30 PM, Philippe Mathieu-Daudé wrote:
> We check the amount of RAM is enough, warn when it is
> not, but if so we neglect to bail out. Fix that by
> adding the missing exit() call.
> 
> Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
> Signed-off-by: Philippe Mathieu-Daudé<f4bug@amsat.org>
> ---
>   hw/rx/rx-gdbsim.c | 1 +
>   1 file changed, 1 insertion(+)

Reviewed-by: Richard Henderson <richard.henderson@linaro.org>

r~


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size
  2021-04-07 22:30 [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size Philippe Mathieu-Daudé
  2021-04-07 22:57 ` Richard Henderson
@ 2021-04-09 14:01 ` Yoshinori Sato
  2021-05-02 16:27 ` Philippe Mathieu-Daudé
  2 siblings, 0 replies; 5+ messages in thread
From: Yoshinori Sato @ 2021-04-09 14:01 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé; +Cc: qemu-devel

On Thu, 08 Apr 2021 07:30:56 +0900,
Philippe Mathieu-Daudé wrote:
> 
> We check the amount of RAM is enough, warn when it is
> not, but if so we neglect to bail out. Fix that by
> adding the missing exit() call.
> 
> Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/rx/rx-gdbsim.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
> index b1d7c2488ff..4e4ececae4b 100644
> --- a/hw/rx/rx-gdbsim.c
> +++ b/hw/rx/rx-gdbsim.c
> @@ -93,6 +93,7 @@ static void rx_gdbsim_init(MachineState *machine)
>          char *sz = size_to_str(mc->default_ram_size);
>          error_report("Invalid RAM size, should be more than %s", sz);
>          g_free(sz);
> +        exit(1);
>      }
>  
>      /* Allocate memory space */
> -- 
> 2.26.3
> 

Reviewed-by: Yoshinori Sato <ysato@users.sourceforge.jp>

-- 
Yoshinori Sato


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size
  2021-04-07 22:30 [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size Philippe Mathieu-Daudé
  2021-04-07 22:57 ` Richard Henderson
  2021-04-09 14:01 ` Yoshinori Sato
@ 2021-05-02 16:27 ` Philippe Mathieu-Daudé
  2021-05-02 18:26   ` Laurent Vivier
  2 siblings, 1 reply; 5+ messages in thread
From: Philippe Mathieu-Daudé @ 2021-05-02 16:27 UTC (permalink / raw)
  To: qemu-devel, QEMU Trivial; +Cc: Yoshinori Sato

Hi Laurent, could you take this patch via your Trivial tree please?

On 4/8/21 12:30 AM, Philippe Mathieu-Daudé wrote:
> We check the amount of RAM is enough, warn when it is
> not, but if so we neglect to bail out. Fix that by
> adding the missing exit() call.
> 
> Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
> ---
>  hw/rx/rx-gdbsim.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
> index b1d7c2488ff..4e4ececae4b 100644
> --- a/hw/rx/rx-gdbsim.c
> +++ b/hw/rx/rx-gdbsim.c
> @@ -93,6 +93,7 @@ static void rx_gdbsim_init(MachineState *machine)
>          char *sz = size_to_str(mc->default_ram_size);
>          error_report("Invalid RAM size, should be more than %s", sz);
>          g_free(sz);
> +        exit(1);
>      }
>  
>      /* Allocate memory space */
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size
  2021-05-02 16:27 ` Philippe Mathieu-Daudé
@ 2021-05-02 18:26   ` Laurent Vivier
  0 siblings, 0 replies; 5+ messages in thread
From: Laurent Vivier @ 2021-05-02 18:26 UTC (permalink / raw)
  To: Philippe Mathieu-Daudé, qemu-devel, QEMU Trivial; +Cc: Yoshinori Sato

Le 02/05/2021 à 18:27, Philippe Mathieu-Daudé a écrit :
> Hi Laurent, could you take this patch via your Trivial tree please?
> 
> On 4/8/21 12:30 AM, Philippe Mathieu-Daudé wrote:
>> We check the amount of RAM is enough, warn when it is
>> not, but if so we neglect to bail out. Fix that by
>> adding the missing exit() call.
>>
>> Fixes: bda19d7bb56 ("hw/rx: Add RX GDB simulator")
>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>> ---
>>  hw/rx/rx-gdbsim.c | 1 +
>>  1 file changed, 1 insertion(+)
>>
>> diff --git a/hw/rx/rx-gdbsim.c b/hw/rx/rx-gdbsim.c
>> index b1d7c2488ff..4e4ececae4b 100644
>> --- a/hw/rx/rx-gdbsim.c
>> +++ b/hw/rx/rx-gdbsim.c
>> @@ -93,6 +93,7 @@ static void rx_gdbsim_init(MachineState *machine)
>>          char *sz = size_to_str(mc->default_ram_size);
>>          error_report("Invalid RAM size, should be more than %s", sz);
>>          g_free(sz);
>> +        exit(1);
>>      }
>>  
>>      /* Allocate memory space */
>>
> 

Applied to my trivial-patches branch.

Thanks,
Laurent



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2021-05-02 18:35 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-07 22:30 [PATCH-for-6.0?] hw/rx/rx-gdbsim: Do not accept invalid memory size Philippe Mathieu-Daudé
2021-04-07 22:57 ` Richard Henderson
2021-04-09 14:01 ` Yoshinori Sato
2021-05-02 16:27 ` Philippe Mathieu-Daudé
2021-05-02 18:26   ` Laurent Vivier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).