[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 15/16] vl: Clean up -smp error handling
From: |
Philippe Mathieu-Daudé |
Subject: |
Re: [PATCH 15/16] vl: Clean up -smp error handling |
Date: |
Tue, 20 Jul 2021 20:07:23 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 7/20/21 2:54 PM, Markus Armbruster wrote:
> The Error ** argument must be NULL, &error_abort, &error_fatal, or a
> pointer to a variable containing NULL. Passing an argument of the
> latter kind twice without clearing it in between is wrong: if the
> first call sets an error, it no longer points to NULL for the second
> call.
>
> machine_parse_property_opt() is wrong that way: it passes @errp to
> keyval_parse() without checking for failure, then passes it to
> keyval_merge(). Harmless, since the only caller passes &error_fatal.
>
> Clean up: drop the parameter, and use &error_fatal directly.
>
> Cc: Paolo Bonzini <pbonzini@redhat.com>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> ---
> softmmu/vl.c | 9 +++++----
> 1 file changed, 5 insertions(+), 4 deletions(-)
Reviewed-by: Philippe Mathieu-Daudé <philmd@redhat.com>
- Re: [PATCH 07/16] vfio: Avoid error_propagate() after migrate_add_blocker(), (continued)
- [PATCH 05/16] vhost-scsi: Plug memory leak on migrate_add_blocker() failure, Markus Armbruster, 2021/07/20
- [PATCH 11/16] microvm: Drop dead error handling in microvm_machine_state_init(), Markus Armbruster, 2021/07/20
- [PATCH 04/16] multi-process: Fix pci_proxy_dev_realize() error handling, Markus Armbruster, 2021/07/20
- [PATCH 15/16] vl: Clean up -smp error handling, Markus Armbruster, 2021/07/20
- Re: [PATCH 15/16] vl: Clean up -smp error handling,
Philippe Mathieu-Daudé <=
- [PATCH 14/16] Remove superfluous ERRP_GUARD(), Markus Armbruster, 2021/07/20
- [PATCH 16/16] vl: Don't continue after -smp help., Markus Armbruster, 2021/07/20
- [PATCH 12/16] vhost: Clean up how VhostOpts method vhost_get_config() fails, Markus Armbruster, 2021/07/20
- [PATCH 13/16] vhost: Clean up how VhostOpts method vhost_backend_init() fails, Markus Armbruster, 2021/07/20
- [PATCH 01/16] error: Use error_fatal to simplify obvious fatal errors (again), Markus Armbruster, 2021/07/20
- Re: [PATCH 00/16] Various error handling fixes and cleanups, Michael S. Tsirkin, 2021/07/23