All of lore.kernel.org
 help / color / mirror / Atom feed
From: Fabiano Rosas <farosas@suse.de>
To: Sergei Heifetz <heifetz@yandex-team.com>, qemu-devel@nongnu.org
Cc: "Marc-André Lureau" <marcandre.lureau@redhat.com>,
	"Paolo Bonzini" <pbonzini@redhat.com>,
	"Philippe Mathieu-Daudé" <philmd@linaro.org>,
	"Peter Xu" <peterx@redhat.com>, "Ani Sinha" <anisinha@redhat.com>,
	qemu-trivial@nongnu.org, "Laurent Vivier" <laurent@vivier.eu>
Subject: Re: [PATCH v4 1/4] migration/savevm.c: reorder usage and assertion of mis->from_src_file
Date: Wed, 11 Mar 2026 10:58:35 -0300	[thread overview]
Message-ID: <87fr66zcvo.fsf@suse.de> (raw)
In-Reply-To: <20260311131522.58600-2-heifetz@yandex-team.com>

Sergei Heifetz <heifetz@yandex-team.com> writes:

> Reorder the code so the assertion of mis->from_src_file occurs before
> the call to migration_ioc_unregister_yank_from_file, which dereferences
> it in qemu_file_get_ioc.
>
> Fixes: 39675ffffb3394 ("migration: Move the yank unregister of channel_close out")
> Signed-off-by: Sergei Heifetz <heifetz@yandex-team.com>
> Reviewed-by: Laurent Vivier <laurent@vivier.eu>
> ---
>  migration/savevm.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/migration/savevm.c b/migration/savevm.c
> index 3dc812a7bbb..930a3391e35 100644
> --- a/migration/savevm.c
> +++ b/migration/savevm.c
> @@ -2885,13 +2885,14 @@ static bool postcopy_pause_incoming(MigrationIncomingState *mis)
>  
>      assert(migrate_postcopy_ram());
>  
> +    assert(mis->from_src_file);
> +
>      /*
>       * Unregister yank with either from/to src would work, since ioc behind it
>       * is the same
>       */
>      migration_ioc_unregister_yank_from_file(mis->from_src_file);
>  
> -    assert(mis->from_src_file);
>      qemu_file_shutdown(mis->from_src_file);
>      qemu_fclose(mis->from_src_file);
>      mis->from_src_file = NULL;

Acked-by: Fabiano Rosas <farosas@suse.de>


  reply	other threads:[~2026-03-11 13:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-11 13:15 [PATCH v4 0/4] Fix a few minor issues reported by Coverity Sergei Heifetz
2026-03-11 13:15 ` [PATCH v4 1/4] migration/savevm.c: reorder usage and assertion of mis->from_src_file Sergei Heifetz
2026-03-11 13:58   ` Fabiano Rosas [this message]
2026-03-12 11:43   ` Prasad Pandit
2026-03-11 13:15 ` [PATCH v4 2/4] dump/dump.c: reorder usage and assertion of block Sergei Heifetz
2026-03-11 13:15 ` [PATCH v4 3/4] system/physmem.c: remove useless " Sergei Heifetz
2026-03-11 13:15 ` [PATCH v4 4/4] hw/usb/core.c: reorder usage and assertion of p->ep Sergei Heifetz
2026-03-11 17:37 ` [PATCH v4 0/4] Fix a few minor issues reported by Coverity Peter Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87fr66zcvo.fsf@suse.de \
    --to=farosas@suse.de \
    --cc=anisinha@redhat.com \
    --cc=heifetz@yandex-team.com \
    --cc=laurent@vivier.eu \
    --cc=marcandre.lureau@redhat.com \
    --cc=pbonzini@redhat.com \
    --cc=peterx@redhat.com \
    --cc=philmd@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.