]> git.baikalelectronics.ru Git - kernel.git/commit
nvmet-fc: fix missing check for no hostport struct
authorJames Smart <james.smart@broadcom.com>
Tue, 22 Sep 2020 21:54:12 +0000 (14:54 -0700)
committerChristoph Hellwig <hch@lst.de>
Sun, 27 Sep 2020 07:14:19 +0000 (09:14 +0200)
commit47ae2b0b4e0161a04fdf16329ccfaeb0c0a5129d
tree76ec68d1f8dbab151b42f975a1456f42bcb0db2a
parent6ed9708c0b7777d1d7eb567bfe3c7ae293fc69b6
nvmet-fc: fix missing check for no hostport struct

A hostport port pointer is allowed to be NULL as it is not allocated if
the lldd does not support the new interfaces for NVME LS request support.
The hostport free routine validates the handle but forgot to validate the
hostport pointer.

Validate the hostport pointer before using it to validate the handle.

Signed-off-by: James Smart <james.smart@broadcom.com>
Reviewed-by: Himanshu Madhani <himanshu.madhani@oracle.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/nvme/target/fc.c