Skip to content
Snippets Groups Projects
Commit 36a251c3 authored by Klaus Jensen's avatar Klaus Jensen
Browse files

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: 63d96e4f ("hw/nvme: reimplement zone reset to allow cancellation")
Reviewed-by: default avatarKeith Busch <kbusch@kernel.org>
Signed-off-by: default avatarKlaus Jensen <k.jensen@samsung.com>
parent 3dbc1708
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment