[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 3/6] fixup scsi: only access SCSIDevice->requests from one thr
From: |
Stefan Hajnoczi |
Subject: |
[PATCH v2 3/6] fixup scsi: only access SCSIDevice->requests from one thread |
Date: |
Thu, 21 Dec 2023 10:35:45 -0500 |
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>
---
hw/scsi/scsi-bus.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/hw/scsi/scsi-bus.c b/hw/scsi/scsi-bus.c
index df68a44b6a..5b08cbf60a 100644
--- a/hw/scsi/scsi-bus.c
+++ b/hw/scsi/scsi-bus.c
@@ -127,7 +127,8 @@ static void scsi_device_for_each_req_async_bh(void *opaque)
*/
ctx = blk_get_aio_context(s->conf.blk);
if (ctx != qemu_get_current_aio_context()) {
- aio_bh_schedule_oneshot(ctx, scsi_device_for_each_req_async_bh, data);
+ aio_bh_schedule_oneshot(ctx, scsi_device_for_each_req_async_bh,
+ g_steal_pointer(&data));
return;
}
--
2.43.0
- [PATCH v2 0/6] qemu-iotests fixes for Kevin's block tree, Stefan Hajnoczi, 2023/12/21
- [PATCH v2 1/6] fixup block-coroutine-wrapper: use qemu_get_current_aio_context(), Stefan Hajnoczi, 2023/12/21
- [PATCH v2 2/6] fixup block: remove AioContext locking, Stefan Hajnoczi, 2023/12/21
- [PATCH v2 3/6] fixup scsi: only access SCSIDevice->requests from one thread,
Stefan Hajnoczi <=
- [PATCH v2 4/6] nbd/server: avoid per-NBDRequest nbd_client_get/put(), Stefan Hajnoczi, 2023/12/21
- [PATCH v2 6/6] nbd/server: introduce NBDClient->lock to protect fields, Stefan Hajnoczi, 2023/12/21
- [PATCH v2 5/6] nbd/server: only traverse NBDExport->clients from main loop thread, Stefan Hajnoczi, 2023/12/21