nvme-fabrics: reset admin connection for secure concatenation
Hello Hannes Reinecke,
This is a semi-automatic email about new static checker warnings.
Commit 104d0e2f6222 ("nvme-fabrics: reset admin connection for secure concatenation") from Feb 24, 2025, leads to the following Smatch complaint:
drivers/nvme/host/tcp.c:2359 nvme_tcp_setup_ctrl()
warn: variable dereferenced before check 'ctrl->opts' (see line 2355)drivers/nvme/host/tcp.c
2354
2355 ret = nvme_tcp_configure_admin_queue(ctrl, new);
^^^^ctrl->opts is dereference here
2356 if (ret)
2357 return ret;
2358
2359 if (ctrl->opts && ctrl->opts->concat && !ctrl->tls_pskid) {
^^^^^^^^^^so hopefully this check can be safely removed.
2360 /* See comments for nvme_tcp_key_revoke_needed() */
2361 dev_dbg(ctrl->device, "restart admin queue for secure concatenation\n");
regards,
dan carpenter
Sagi Grimberg
maintainerQuoted 15 lines · Dan Carpenter
Hello Hannes Reinecke,
This is a semi-automatic email about new static checker warnings.
Commit
104d0e2f6222("nvme-fabrics: reset admin connection for secure concatenation") from Feb 24, 2025, leads to the following Smatch complaint:drivers/nvme/host/tcp.c:2359 nvme_tcp_setup_ctrl() warn: variable dereferenced before check 'ctrl->opts' (see line 2355)
drivers/nvme/host/tcp.c
23542355 ret = nvme_tcp_configure_admin_queue(ctrl, new); ^^^^
Quoted 8 lines
ctrl->optsis dereference here2356 if (ret) 2357 return ret; 2358 2359 if (ctrl->opts && ctrl->opts->concat && !ctrl->tls_pskid) { ^^^^^^^^^^so hopefully this check can be safely removed.
Yes it can.
Hannes, can you send a patch to remove this check?
Thanks Dan.
Quoted 25 lines · Sagi Grimberg
Quoted 22 lines · Dan Carpenter
Hello Hannes Reinecke,
This is a semi-automatic email about new static checker warnings.
Commit
104d0e2f6222("nvme-fabrics: reset admin connection for secure concatenation") from Feb 24, 2025, leads to the following Smatch complaint:
drivers/nvme/host/tcp.c:2359nvme_tcp_setup_ctrl()
warn: variable dereferenced before check 'ctrl->opts' (see line 2355)
drivers/nvme/host/tcp.c
2354
2355 ret =nvme_tcp_configure_admin_queue(ctrl, new); ^^^^ctrl->optsis dereference here2356 if (ret)
2357 return ret;
2358
2359 if (ctrl->opts&&ctrl->opts->concat&& !ctrl-Quoted 1 line
tls_pskid) {
Quoted 8 lines
Quoted 2 lines
^^^^^^^^^^
so hopefully this check can be safely removed.Yes it can.
Hannes, can you send a patch to remove this check?
Thanks Dan.
Done.
Cheers,
Hannes
Signature · 4 lines
Dr. Hannes Reinecke Kernel Storage Architect [email protected] +49 911 74053 688 SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich