]> git.proxmox.com Git - mirror_qemu.git/commit
migration/postcopy: Ensure postcopy_start() sets errp if it fails
authorAvihai Horon <avihaih@nvidia.com>
Thu, 28 Mar 2024 14:02:52 +0000 (16:02 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Mon, 1 Apr 2024 16:30:21 +0000 (19:30 +0300)
commit31684769650a2bd57ac2c1fc9441f08d4f9b4e1f
tree4872fabb48482f5139830a50f209db01dfa929fd
parent35fface50fe56ea4a4d236d11e6f07bd6e153366
migration/postcopy: Ensure postcopy_start() sets errp if it fails

There are several places where postcopy_start() fails without setting
errp. This can cause a null pointer de-reference, as in case of error,
the caller of postcopy_start() copies/prints the error set in errp.

Fix it by setting errp in all of postcopy_start() error paths.

Cc: qemu-stable <qemu-stable@nongnu.org>
Fixes: 908927db28ea ("migration: Update error description whenever migration fails")
Signed-off-by: Avihai Horon <avihaih@nvidia.com>
Reviewed-by: Cédric Le Goater <clg@redhat.com>
Reviewed-by: Peter Xu <peterx@redhat.com>
Link: https://lore.kernel.org/r/20240328140252.16756-3-avihaih@nvidia.com
Signed-off-by: Peter Xu <peterx@redhat.com>
(cherry picked from commit d0ad271a7613459bd0a3397c8071a4ad06f3f7eb)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
migration/migration.c