Home
last modified time | relevance | path

Searched hist:"36 a251c3" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/nvme/
H A Dctrl.c36a251c3 Thu Nov 10 00:59:47 CST 2022 Klaus Jensen <k.jensen@samsung.com> 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>