]> Gentwo Git Trees - linux/.git/commit
psp: fix preemptive inet_twsk() cast in psp_sk_get_assoc_rcu()
authorDaniel Zahka <daniel.zahka@gmail.com>
Thu, 18 Sep 2025 15:52:03 +0000 (08:52 -0700)
committerJakub Kicinski <kuba@kernel.org>
Sat, 20 Sep 2025 00:01:20 +0000 (17:01 -0700)
commit803cdb6ddca3e24418226e17e4b1c1134619aca8
tree4c8c2a64e30db32411d06695b9a68a9ca36ba6be
parentf8d2f8205be8cceef2dd3c0e68e7af3c5f83c75c
psp: fix preemptive inet_twsk() cast in psp_sk_get_assoc_rcu()

It is weird to cast to a timewait_sock before checking sk_state, even
if the use is after such a check. Remove the tw local variable, and
use inet_twsk() directly in the timewait branch.

Signed-off-by: Daniel Zahka <daniel.zahka@gmail.com>
Link: https://patch.msgid.link/20250918155205.2197603-3-daniel.zahka@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/psp/functions.h