nvme-fc: do not reference lsrsp after failure
authorDaniel Wagner <wagi@kernel.org>
Wed, 7 May 2025 12:23:10 +0000 (14:23 +0200)
committerChristoph Hellwig <hch@lst.de>
Tue, 20 May 2025 03:34:27 +0000 (05:34 +0200)
commit0164d1350a651fd208a8c7138443dc4af82e0fa5
treee230724e44a4bdb21563c7084419ae8ee1210d3f
parent3466b7a6b713071190888526d3b9c58cda60b55f
nvme-fc: do not reference lsrsp after failure

The lsrsp object is maintained by the LLDD. The lifetime of the lsrsp
object is implicit. Because there is no explicit cleanup/free call into
the LLDD, it is not safe to assume after xml_rsp_fails, that the lsrsp
is still valid. The LLDD could have freed the object already.

With the recent changes how fcloop tracks the resources, this is the
case. Thus don't access lsrsp after xml_rsp_fails.

Signed-off-by: Daniel Wagner <wagi@kernel.org>
Reviewed-by: Hannes Reinecke <hare@kernel.org>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/host/fc.c