]> www.infradead.org Git - users/hch/misc.git/commit
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>
Mon, 12 May 2025 14:06:53 +0000 (16:06 +0200)
commita38f2f3b0efde6f4b9aa998ec8d2778fa601b330
treec111b53a0751f87d3e483b820e67866e087410ff
parenta10e0dbab92c9774febef4169cb87315c2e69f1f
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