diff options
| author | Linmao Li <lilinmao@kylinos.cn> | 2026-08-19 19:42:41 +0800 |
|---|---|---|
| committer | Martin K. Petersen (Oracle) <mkp@kernel.org> | 2026-08-28 21:33:03 -0400 |
| commit | 98f0a1422e285f6132a73932ebd4fe5c6f513261 (patch) | |
| tree | ba9d759f508b9eee34ec25700dec2e29f4bf1efa /scripts/Makefile.thinlto | |
| parent | 12e67eb89eb2b9516685c744d3f7de0a2d1bd701 (diff) | |
scsi: fnic: Initialize the NVMe local port info before registering
nvfnic_add_lport() declares struct nvme_fc_port_info on the stack and
fills in four of its five members, leaving dev_loss_tmo holding whatever
the stack happened to contain before the call. The structure is then
handed to nvme_fc_register_localport().
nvfnic_add_tport(), which registers the remote port a few lines further
down, memsets its own struct nvme_fc_port_info first, so only the local
port path passes uninitialized data across the transport interface.
The NVMe/FC transport documents dev_loss_tmo as "Used only on a
remoteport" and does not read it in nvme_fc_register_localport(), so
there is no behavioural change today. Initialize the structure anyway:
the driver must not depend on which members the transport happens to
consume, and any member added to struct nvme_fc_port_info later would
silently start out as stack garbage.
Signed-off-by: Linmao Li <lilinmao@kylinos.cn>
Tested-by: Karan Tilak Kumar <kartilak@cisco.com>
Reviewed-by: Karan Tilak Kumar <kartilak@cisco.com>
Link: https://patch.msgid.link/20260819114242.3598034-2-lilinmao@kylinos.cn
Signed-off-by: Martin K. Petersen (Oracle) <mkp@kernel.org>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions
