diff options
author | Wenchao Hao <haowenchao2@huawei.com> | 2023-10-11 21:03:50 +0800 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2023-10-13 14:15:54 -0400 |
commit | 4df105f0ce9f6f30cda4e99f577150d23f0c9c5f (patch) | |
tree | 8a60338a882647536f6110f06c6ce11f4ead5187 /drivers/md/dm-bufio.c | |
parent | f42706a8f0cb57db3990a7f53be8bcc2a2be9b27 (diff) |
scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
fc_lport_ptp_setup() did not check the return value of fc_rport_create()
which can return NULL and would cause a NULL pointer dereference. Address
this issue by checking return value of fc_rport_create() and log error
message on fc_rport_create() failed.
Signed-off-by: Wenchao Hao <haowenchao2@huawei.com>
Link: https://lore.kernel.org/r/20231011130350.819571-1-haowenchao2@huawei.com
Reviewed-by: Simon Horman <horms@kernel.org>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/md/dm-bufio.c')
0 files changed, 0 insertions, 0 deletions