Message ID | 20250409003014.19697-1-kuniyu@amazon.com (mailing list archive) |
---|---|
Headers | show |
Series | net: Retire DCCP socket. | expand |
On Tue, 8 Apr 2025 17:29:07 -0700 Kuniyuki Iwashima wrote: > As announced by commit b144fcaf46d4 ("dccp: Print deprecation > notice."), it's time to remove DCCP socket. > > The patch 2 removes net/dccp, LSM code, doc, and etc, leaving > DCCP netfilter modules. > > The patch 3 unexports shared functions for DCCP, and the patch 4 > renames tcp_or_dccp_get_hashinfo() to tcp_get_hashinfo(). > > We can do more cleanup; for example, remove IPPROTO_TCP checks in > __inet6?_check_established(), remove __module_get() for twsk, > remove timewait_sock_ops.twsk_destructor(), etc, but it will be > more of TCP stuff, so I'll defer to a later series. So it builds now but appears to break 1/3rd of the selftests :)
From: Jakub Kicinski <kuba@kernel.org> Date: Wed, 9 Apr 2025 06:49:49 -0700 > On Tue, 8 Apr 2025 17:29:07 -0700 Kuniyuki Iwashima wrote: > > As announced by commit b144fcaf46d4 ("dccp: Print deprecation > > notice."), it's time to remove DCCP socket. > > > > The patch 2 removes net/dccp, LSM code, doc, and etc, leaving > > DCCP netfilter modules. > > > > The patch 3 unexports shared functions for DCCP, and the patch 4 > > renames tcp_or_dccp_get_hashinfo() to tcp_get_hashinfo(). > > > > We can do more cleanup; for example, remove IPPROTO_TCP checks in > > __inet6?_check_established(), remove __module_get() for twsk, > > remove timewait_sock_ops.twsk_destructor(), etc, but it will be > > more of TCP stuff, so I'll defer to a later series. > > So it builds now but appears to break 1/3rd of the selftests :) Ahh sorry, I made a mistake while inlining sk_clone_lock()... Will squash diff below in v3. Thanks! ---8<--- $ git diff --cached | cat diff --git a/net/core/sock.c b/net/core/sock.c index e76b2bcec33d..e053ab6380f5 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -2490,13 +2490,13 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) if (!is_charged) RCU_INIT_POINTER(newsk->sk_filter, NULL); - goto out; + goto free; } RCU_INIT_POINTER(newsk->sk_reuseport_cb, NULL); if (bpf_sk_storage_clone(sk, newsk)) - goto out; + goto free; /* Clear sk_user_data if parent had the pointer tagged * as not suitable for copying when cloning. @@ -2525,12 +2525,16 @@ struct sock *sk_clone_lock(const struct sock *sk, const gfp_t priority) if (sock_needs_netstamp(sk) && newsk->sk_flags & SK_FLAGS_TIMESTAMP) net_enable_timestamp(); out: + return newsk; +free: /* It is still raw copy of parent, so invalidate - * destructor and make plain sk_free() */ + * destructor and make plain sk_free() + */ newsk->sk_destruct = NULL; bh_unlock_sock(newsk); sk_free(newsk); - return NULL; + newsk = NULL; + goto out; } EXPORT_SYMBOL_GPL(sk_clone_lock); ---8<---