]> git.ipfire.org Git - thirdparty/qemu.git/commit
nvme: call blk_drain in NVMe reset code to avoid lockups
authorIgor Druzhinin <igor.druzhinin@citrix.com>
Tue, 6 Nov 2018 12:16:55 +0000 (12:16 +0000)
committerKevin Wolf <kwolf@redhat.com>
Thu, 22 Nov 2018 15:43:52 +0000 (16:43 +0100)
commit6bf7463615752934d7221e5be9820d9da45ab2de
treeb873ae115df8c9178f9c0c7c6d4befc1ff90423f
parente4c8f2925d22584b2008aadea5c70e1e05c2a522
nvme: call blk_drain in NVMe reset code to avoid lockups

When blk_flush called in NVMe reset path S/C queues are already freed
which means that re-entering AIO handling loop having some IO requests
unfinished will lockup or crash as their SG structures being potentially
reused. Call blk_drain before freeing the queues to avoid this nasty
scenario.

Signed-off-by: Igor Druzhinin <igor.druzhinin@citrix.com>
Acked-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
hw/block/nvme.c