[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-stable] [PATCH 18/54] scsi-disk: release AioContext in unaligned W
From: |
Michael Roth |
Subject: |
[Qemu-stable] [PATCH 18/54] scsi-disk: release AioContext in unaligned WRITE SAME case |
Date: |
Tue, 6 Feb 2018 13:14:39 -0600 |
From: Stefan Hajnoczi <address@hidden>
scsi_write_same_complete() can retry the write if the request was
unaligned. Make sure to release the AioContext when that code path is
taken!
This patch fixes a hang when QEMU terminates after an unaligned WRITE
SAME request has been processed with dataplane. The hang occurs because
iothread_stop_all() cannot acquire the AioContext lock that was leaked
by the IOThread in scsi_write_same_complete().
Fixes: b9e413dd37 ("block: explicitly acquire aiocontext in aio callbacks that
need it").
Cc: Paolo Bonzini <address@hidden>
Cc: address@hidden
Reported-by: Cong Li <address@hidden>
Signed-off-by: Stefan Hajnoczi <address@hidden>
Message-Id: <address@hidden>
Signed-off-by: Paolo Bonzini <address@hidden>
(cherry picked from commit 24355b79bdaf6ab12f7c610b032fc35ec045cd55)
Signed-off-by: Michael Roth <address@hidden>
---
hw/scsi/scsi-disk.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 12431177a7..5e4d2c38f0 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -1755,6 +1755,7 @@ static void scsi_write_same_complete(void *opaque, int
ret)
data->sector << BDRV_SECTOR_BITS,
&data->qiov, 0,
scsi_write_same_complete, data);
+ aio_context_release(blk_get_aio_context(s->qdev.conf.blk));
return;
}
--
2.11.0
- [Qemu-stable] [PATCH 00/54] Patch Round-up for stable 2.11.1, freeze on 2018-02-12, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 09/54] block: Open backing image in force share mode for size probe, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 11/54] hw/intc/arm_gicv3: Make reserved register addresses RAZ/WI, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 12/54] hw/intc/arm_gic: reserved register addresses are RAZ/WI, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 13/54] virtio_error: don't invoke status callbacks, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 14/54] vhost: remove assertion to prevent crash, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 18/54] scsi-disk: release AioContext in unaligned WRITE SAME case,
Michael Roth <=
- [Qemu-stable] [PATCH 15/54] hw/sd/pl181: Reset SD card on controller reset, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 17/54] hw/sd/ssi-sd: Reset SD card on controller reset, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 16/54] hw/sd/milkymist-memcard: Reset SD card on controller reset, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 20/54] i386: Change X86CPUDefinition::model_id to const char*, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 01/54] target/i386: Fix handling of VEX prefixes, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 21/54] i386: Add support for SPEC_CTRL MSR, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 23/54] i386: Add FEAT_8000_0008_EBX CPUID feature word, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 19/54] hw/pci-bridge: fix QEMU crash because of pcie-root-port, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 27/54] s390x: fix storage attributes migration for non-small guests, Michael Roth, 2018/02/06
- [Qemu-stable] [PATCH 22/54] i386: Add spec-ctrl CPUID bit, Michael Roth, 2018/02/06