Stefan Hajnoczi 24355b79bd scsi-disk: release AioContext in unaligned WRITE SAME case
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 <pbonzini@redhat.com>
Cc: qemu-stable@nongnu.org
Reported-by: Cong Li <coli@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Message-Id: <20180104142502.15175-1-stefanha@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
2018-01-16 14:54:50 +01:00
..
2018-01-08 11:18:23 +01:00
2016-10-04 13:28:07 +01:00
2018-01-11 13:25:34 +00:00
2017-12-18 17:07:02 +03:00
2017-12-22 15:03:41 +01:00
2017-12-20 11:30:55 +00:00
2017-10-27 16:03:54 +02:00
2017-12-18 17:07:02 +03:00
2018-01-16 14:54:50 +01:00
2016-01-29 15:07:25 +00:00
2017-12-18 17:07:02 +03:00
2017-12-22 09:01:09 -05:00
2017-12-18 17:07:03 +03:00
2017-08-30 18:23:25 +02:00