[bug report] nvme-fabrics: reset admin connection for secure concatenation

Hannes Reinecke hare at suse.de
Mon Apr 14 23:00:41 PDT 2025


On 4/14/25 23:50, Sagi Grimberg wrote:
> 
> 
> 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.

Done.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare at suse.de                                +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



More information about the Linux-nvme mailing list