[bug report] nvme-fabrics: reset admin connection for secure concatenation
Sagi Grimberg
sagi at grimberg.me
Mon Apr 14 14:50:26 PDT 2025
On 22/03/2025 9:40, Dan Carpenter wrote:
> 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.
Yes it can.
Hannes, can you send a patch to remove this check?
Thanks Dan.
More information about the Linux-nvme
mailing list