]> git.baikalelectronics.ru Git - kernel.git/commit
nvme-multipath: split bios with the ns_head bio_set before submitting
authorHannes Reinecke <hare@suse.de>
Tue, 30 Apr 2019 16:57:09 +0000 (18:57 +0200)
committerChristoph Hellwig <hch@lst.de>
Wed, 1 May 2019 13:17:15 +0000 (09:17 -0400)
commitbfeb936945f07e0f2d19f8966e416b3bb6a3aebd
tree5686fda24fccbdb0b8f04d3e784974e0e555cb8c
parent26b761e69c2a475434c59d9ef2de8108e0d5c1aa
nvme-multipath: split bios with the ns_head bio_set before submitting

If the bio is moved to a different queue via blk_steal_bios() and
the original queue is destroyed in nvme_remove_ns() we'll be ending
with a crash in bio_endio() as the mempool for the split bio bvecs
had already been destroyed.
So split the bio using the original queue (which will remain during the
lifetime of the bio) before sending it down to the underlying device.

Signed-off-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/multipath.c