]> git.ipfire.org Git - thirdparty/qemu.git/commit
hw/core/qdev-properties-system: Add missing return in set_drive_helper()
authorFiona Ebner <f.ebner@proxmox.com>
Fri, 23 May 2025 07:02:11 +0000 (09:02 +0200)
committerMichael Tokarev <mjt@tls.msk.ru>
Wed, 9 Jul 2025 08:30:58 +0000 (11:30 +0300)
commit2d39032357c2627cddadacb2d797c854b9bbb28c
tree3d4e0791268f807987f36216ab92cd3da87a1029
parentf9a70c82c231f745726f40bd190763775d16b1e8
hw/core/qdev-properties-system: Add missing return in set_drive_helper()

Currently, changing the 'drive' property of e.g. a scsi-hd object will
result in an assertion failure if the aio context of the block node
it's replaced with doesn't match the current aio context:

> bdrv_replace_child_noperm: Assertion `bdrv_get_aio_context(old_bs) ==
> bdrv_get_aio_context(new_bs)' failed.

The problematic scenario is already detected, but a 'return' statement
was missing.

Cc: qemu-stable@nongnu.org
Fixes: d1a58c176a ("qdev: allow setting drive property for realized device")
Signed-off-by: Fiona Ebner <f.ebner@proxmox.com>
Message-ID: <20250523070211.280498-1-f.ebner@proxmox.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit eef2dd03f948a512499775043bdc0c5c88d8a2dd)
Signed-off-by: Michael Tokarev <mjt@tls.msk.ru>
hw/core/qdev-properties-system.c