syztest

Arnaud Lecomte
2025-06-29T14:47:57Z

#syz test

--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -126,8 +126,12 @@ static struct sock *smc_tcp_syn_recv_sock(const struct sock *sk,
struct smc_sock *smc;
struct sock *child;

+ lockdep_assert_held_read(&sk->sk_callback_lock);
smc = smc_clcsock_user_data(sk);

+ if (!smc)
+ goto drop;
+
if (READ_ONCE(sk->sk_ack_backlog) + atomic_read(&smc->queued_smc_hs) >
sk->sk_max_ack_backlog)
goto drop;
--
2.43.0