diff options
author | Klaus Jensen | 2022-11-10 07:59:50 +0100 |
---|---|---|
committer | Klaus Jensen | 2022-12-01 08:45:00 +0100 |
commit | 818b9b8f5efb728793b9a2c124adab371d2c16e5 (patch) | |
tree | 33d2a71b27b2259c113203d6a85099e7aa4eb350 /hw/virtio/vhost.c | |
parent | hw/nvme: fix aio cancel in zone reset (diff) | |
download | qemu-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