[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 27/52] scsi-disk: release AioContext in unaligned WRI
From: |
Paolo Bonzini |
Subject: |
[Qemu-devel] [PULL 27/52] scsi-disk: release AioContext in unaligned WRITE SAME case |
Date: |
Fri, 12 Jan 2018 12:30:51 +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 11/52] build-sys: add a rule to print a variable, (continued)
- [Qemu-devel] [PULL 11/52] build-sys: add a rule to print a variable, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 17/52] vl: fix direct firmware directories leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 18/52] readline: add a free function, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 20/52] crypto: fix stack-buffer-overflow error, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 19/52] tests: fix migration-test leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 23/52] ucontext: annotate coroutine stack for ASAN, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 25/52] mips: fix potential fopen(NULL,...), Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 21/52] qemu-config: fix leak in query-command-line-options, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 22/52] tests: fix qmp-test leak, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 26/52] disas/s390: fix global-buffer-overflow, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 27/52] scsi-disk: release AioContext in unaligned WRITE SAME case,
Paolo Bonzini <=
- [Qemu-devel] [PULL 24/52] tests: fix coroutine leak in /basic/entered, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 28/52] tests/boot-serial-test: Add tests for microblaze boards, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 29/52] tests/boot-serial-test: Add a test for the moxiesim machine, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 32/52] target/i386: hax: change to use x86_update_hflags, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 31/52] target/i386: move hflags update code to a function, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 35/52] scripts/qemu-gdb: add simple tcg lock status helper, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 34/52] target-i386: update hflags on Hypervisor.framework, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 36/52] scripts/qemu-gdb/timers.py: new helper to dump timer state, Paolo Bonzini, 2018/01/12
- [Qemu-devel] [PULL 33/52] target/i386: hax: Move x86_update_hflags., Paolo Bonzini, 2018/01/12