lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <ed993f55-bdfc-4376-951d-9af4a4f461a9@suse.de>
Date: Wed, 23 Apr 2025 08:21:34 +0200
From: Hannes Reinecke <hare@...e.de>
To: Alistair Francis <alistair23@...il.com>, hch@....de, sagi@...mberg.me,
 kch@...dia.com, linux-nvme@...ts.infradead.org
Cc: linux-kernel@...r.kernel.org, csander@...estorage.com,
 shinichiro.kawasaki@....com, Alistair Francis <alistair.francis@....com>
Subject: Re: [PATCH] nvmet-tcp: don't restore null sk_state_change

On 4/23/25 08:06, Alistair Francis wrote:
> queue->state_change is set as part of nvmet_tcp_set_queue_sock(), but if
> the TCP connection isn't established when nvmet_tcp_set_queue_sock() is
> called then queue->state_change isn't set and sock->sk->sk_state_change
> isn't replaced.
> 
> As such we don't need to restore sock->sk->sk_state_change if
> queue->state_change is NULL.
> 
Good catch!

[ .. ]

> Resolves: https://lore.kernel.org/linux-nvme/5hdonndzoqa265oq3bj6iarwtfk5dewxxjtbjvn5uqnwclpwt6@a2n6w3taxxex/
> Signed-off-by: Alistair Francis <alistair.francis@....com>
> ---
> We could also remove the `sock->sk->sk_state != TCP_ESTABLISHED` check
> in nvmet_tcp_set_queue_sock() if that's prefered.
> 
Please do.
We cannot influence what the network stack did, so if there ever were a 
modification which caused the ->state_change callback _not_ to be set
the whole issue pops up again.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke                  Kernel Storage Architect
hare@...e.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ