[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 25/51] scsi-disk: release AioContext in unaligned WRI
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 25/51] scsi-disk: release AioContext in unaligned WRITE SAME case |
Date: |
Tue, 16 Jan 2018 15:17:07 +0100 |
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>
---
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 e58833a..49d2559 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;
}
--
1.8.3.1
- [Qemu-devel] [PULL 12/51] build-sys: compile with -Og or -O1 when --enable-debug, (continued)
- [Qemu-devel] [PULL 12/51] build-sys: compile with -Og or -O1 when --enable-debug, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 14/51] tests/docker: add test-debug, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 09/51] build-sys: fix qemu-ga -pthread linking, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 17/51] readline: add a free function, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 13/51] tests/docker: add some sanitizers to fedora dockerfile, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 15/51] tests: fix check-qobject leak, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 16/51] vl: fix direct firmware directories leak, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 18/51] tests: fix migration-test leak, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 20/51] qemu-config: fix leak in query-command-line-options, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 23/51] mips: fix potential fopen(NULL,...), Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 25/51] scsi-disk: release AioContext in unaligned WRITE SAME case,
Paolo Bonzini <=
- [Qemu-devel] [PULL 19/51] crypto: fix stack-buffer-overflow error, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 26/51] tests/boot-serial-test: Add tests for microblaze boards, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 22/51] tests: fix coroutine leak in /basic/entered, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 27/51] tests/boot-serial-test: Add a test for the moxiesim machine, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 24/51] disas/s390: fix global-buffer-overflow, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 21/51] tests: fix qmp-test leak, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 29/51] target/i386: move hflags update code to a function, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 28/51] tests/boot-serial-test: Add support for the raspi2 machine, Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 31/51] target/i386: hax: Move x86_update_hflags., Paolo Bonzini, 2018/01/16
- [Qemu-devel] [PULL 35/51] icount: fixed saving/restoring of icount warp timers, Paolo Bonzini, 2018/01/16