summary refs log tree commit diff stats
path: root/scripts/qapi
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2022-11-10 07:59:50 +0100
committerKlaus Jensen <k.jensen@samsung.com>2022-12-01 08:45:00 +0100
commit818b9b8f5efb728793b9a2c124adab371d2c16e5 (patch)
tree33d2a71b27b2259c113203d6a85099e7aa4eb350 /scripts/qapi
parent36a251c3468f34a2486dd49836e397534a1bb189 (diff)
downloadfocaccia-qemu-818b9b8f5efb728793b9a2c124adab371d2c16e5.tar.gz
focaccia-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 'scripts/qapi')
0 files changed, 0 insertions, 0 deletions