nvme: catch errors from nvme_configure_metadata()
authorHannes Reinecke <hare@suse.de>
Tue, 14 Nov 2023 13:27:01 +0000 (14:27 +0100)
committerKeith Busch <kbusch@kernel.org>
Mon, 20 Nov 2023 17:25:32 +0000 (09:25 -0800)
commitcd9aed606088d36a7ffff3e808db4e76b1854285
treec3bb19d3bf9292ebe2990d9fb274de53154a9ce2
parent23441536b63677cb2ed9b1637d8ca70315e44bd0
nvme: catch errors from nvme_configure_metadata()

nvme_configure_metadata() is issuing I/O, so we might incur an I/O
error which will cause the connection to be reset.
But in that case any further probing will race with reset and
cause UAF errors.
So return a status from nvme_configure_metadata() and abort
probing if there was an I/O error.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Keith Busch <kbusch@kernel.org>
drivers/nvme/host/core.c