aboutsummaryrefslogtreecommitdiff
path: root/plugins/core.c
diff options
context:
space:
mode:
authorKlaus Jensen <k.jensen@samsung.com>2022-11-10 07:59:40 +0100
committerKlaus Jensen <k.jensen@samsung.com>2022-12-01 08:44:16 +0100
commit433c71e494ec66a7455b8ef2e6b2b42118426e50 (patch)
treee64647d336ce7cbad6c3b33d09d4bce2ea8bb56e /plugins/core.c
parentc4ffd91aba1c3d878e99a3e7ba8aad4826728ece (diff)
downloadqemu-433c71e494ec66a7455b8ef2e6b2b42118426e50.zip
qemu-433c71e494ec66a7455b8ef2e6b2b42118426e50.tar.gz
qemu-433c71e494ec66a7455b8ef2e6b2b42118426e50.tar.bz2
hw/nvme: fix aio cancel in format
There are several bugs in the async cancel code for the Format command. Firstly, cancelling a format operation neglects to set iocb->ret as well as clearing the iocb->aiocb after cancelling the underlying aiocb which causes the aio callback to ignore the cancellation. Trivial fix. Secondly, and worse, because the request is queued up for posting to the CQ in a bottom half, if the cancellation is due to the submission queue being deleted (which calls blk_aio_cancel), the req structure is deallocated in nvme_del_sq prior to the bottom half being schedulued. Fix this by simply removing the bottom half, there is no reason to defer it anyway. Fixes: 3bcf26d3d619 ("hw/nvme: reimplement format nvm to allow cancellation") Reported-by: Jonathan Derrick <jonathan.derrick@linux.dev> Reviewed-by: Keith Busch <kbusch@kernel.org> Signed-off-by: Klaus Jensen <k.jensen@samsung.com>
Diffstat (limited to 'plugins/core.c')
0 files changed, 0 insertions, 0 deletions