summaryrefslogtreecommitdiffstats
path: root/hw/virtio/vhost.c
diff options
context:
space:
mode:
authorKlaus Jensen2022-11-10 07:59:50 +0100
committerKlaus Jensen2022-12-01 08:45:00 +0100
commit818b9b8f5efb728793b9a2c124adab371d2c16e5 (patch)
tree33d2a71b27b2259c113203d6a85099e7aa4eb350 /hw/virtio/vhost.c
parenthw/nvme: fix aio cancel in zone reset (diff)
downloadqemu-818b9b8f5efb728793b9a2c124adab371d2c16e5.tar.gz
qemu-818b9b8f5efb728793b9a2c124adab371d2c16e5.tar.xz
qemu-818b9b8f5efb728793b9a2c124adab371d2c16e5.zip
hw/nvme: fix aio cancel in dsm
When the DSM operation is cancelled asynchronously, we set iocb->ret to -ECANCELED. However, the callback function only checks the return value of the completed aio, which may have completed succesfully prior to the cancellation and thus the callback ends up continuing the dsm operation instead of bailing out. Fix this. Secondly, fix a potential use-after-free by removing the bottom half and enqueuing the completion directly. Fixes: d7d1474fd85d ("hw/nvme: reimplement dsm to allow cancellation") Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'hw/virtio/vhost.c')
0 files changed, 0 insertions, 0 deletions