qemu/hw/block
Fam Zheng 10f5a72f70 virtio-blk: Fix double completion for werror=stop
When a request R is absorbed by request M, it is appended to the
"mr_next" queue led by M, and is completed together with the completion
of M, in virtio_blk_rw_complete.

During DMA restart in virtio_blk_dma_restart_bh, requests in s->rq are
parsed and submitted again, possibly with a stale req->mr_next. It could
be a problem if the request merging in virtio_blk_handle_request hasn't
refreshed every mr_next pointer, in which case, virtio_blk_rw_complete
could walk through unexpected requests following the stale pointers.

Fix this by unsetting the pointer in virtio_blk_rw_complete. It is safe
because this req is either completed and freed right away, or it will be
restarted and parsed from scratch out of the vq later.

Signed-off-by: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
2015-11-17 18:35:57 +08:00
..
dataplane dataplane: Mark host notifiers' client type as "external" 2015-10-23 18:18:24 +02:00
block.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
cdrom.c
ecc.c
fdc.c hw/block/fdc: Implement tray status 2015-10-23 18:18:23 +02:00
hd-geometry.c BlockConf: Call backend functions to detect geometry and blocksizes 2015-03-10 14:02:22 +01:00
m25p80.c m25p80: fix s->blk usage before assignment 2015-04-28 15:36:09 +02:00
Makefile.objs
nand.c block: remove superfluous '\n' around error_report/error_setg 2015-03-10 08:15:33 +03:00
nvme.c nvme: Account for failed and invalid operations 2015-11-12 16:22:46 +01:00
nvme.h nvme: implement the Flush command 2015-07-14 15:55:19 +02:00
onenand.c Fix bad error handling after memory_region_init_ram() 2015-09-18 14:39:29 +02:00
pflash_cfi01.c pflash_cfi01: add secure property 2015-06-05 17:36:39 +02:00
pflash_cfi02.c hw: Propagate errors through qdev_prop_set_drive() 2015-03-10 11:18:23 +01:00
tc58128.c
virtio-blk.c virtio-blk: Fix double completion for werror=stop 2015-11-17 18:35:57 +08:00
xen_blkif.h
xen_disk.c xen_disk: Account for failed and invalid operations 2015-11-12 16:22:46 +01:00