qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 30/53] migration/rdma: Plug a memory leak and improve a me


From: Juan Quintela
Subject: Re: [PATCH v2 30/53] migration/rdma: Plug a memory leak and improve a message
Date: Wed, 04 Oct 2023 18:27:46 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.3 (gnu/linux)

Markus Armbruster <armbru@redhat.com> wrote:
> When migration capability @rdma-pin-all is true, but the server cannot
> honor it, qemu_rdma_connect() calls macro ERROR(), then returns
> success.
>
> ERROR() sets an error.  Since qemu_rdma_connect() returns success, its
> caller rdma_start_outgoing_migration() duly assumes @errp is still
> clear.  The Error object leaks.
>
> ERROR() additionally reports the situation to the user as an error:
>
>     RDMA ERROR: Server cannot support pinning all memory. Will register 
> memory dynamically.
>
> Is this an error or not?  It actually isn't; we disable @rdma-pin-all
> and carry on.  "Correcting" the user's configuration decisions that
> way feels problematic, but that's a topic for another day.
>
> Replace ERROR() by warn_report().  This plugs the memory leak, and
> emits a clearer message to the user.
>
> Signed-off-by: Markus Armbruster <armbru@redhat.com>
> Reviewed-by: Li Zhijian <lizhijian@fujitsu.com>

Reviewed-by: Juan Quintela <quintela@redhat.com>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]