summary refs log tree commit diff stats
path: root/scripts/qapi/gen.py
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2022-11-10 07:59:47 +0100
committerKlaus Jensen <k.jensen@samsung.com>2022-12-01 08:44:56 +0100
commit36a251c3468f34a2486dd49836e397534a1bb189 (patch)
treebf913084098b567e45ee44e6a6272eea22b968d3 /scripts/qapi/gen.py
parent3dbc1708ea37d03dd18ce498039e31d8565e673a (diff)
downloadfocaccia-qemu-36a251c3468f34a2486dd49836e397534a1bb189.tar.gz
focaccia-qemu-36a251c3468f34a2486dd49836e397534a1bb189.zip
hw/nvme: fix aio cancel in zone reset
If the zone reset operation is cancelled but the block unmap operation
completes normally, the callback will continue resetting the next zone
since it neglects to check iocb->ret which will have been set to
-ECANCELED. Make sure that this is checked and bail out if an error is
present.

Secondly, fix a potential use-after-free by removing the bottom half and
enqueuing the completion directly.

Fixes: 63d96e4ffd71 ("hw/nvme: reimplement zone reset to allow cancellation")
Reviewed-by: Keith Busch <kbusch@kernel.org>
Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'scripts/qapi/gen.py')
0 files changed, 0 insertions, 0 deletions