]> Gentwo Git Trees - linux/.git/commit
sctp: Use sctp_clone_sock() in sctp_do_peeloff().
authorKuniyuki Iwashima <kuniyu@google.com>
Thu, 23 Oct 2025 23:16:56 +0000 (23:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 28 Oct 2025 01:04:58 +0000 (18:04 -0700)
commitb7ddb55f31279f4e59acde3395fc03c3d94b6e5f
tree0903a91bda50ebc01a3709a9a70d511100974f04
parentc49ed521f1772ca9203d22a1e5950f337fd5f930
sctp: Use sctp_clone_sock() in sctp_do_peeloff().

sctp_do_peeloff() calls sock_create() to allocate and initialise
struct sock, inet_sock, and sctp_sock, but later sctp_copy_sock()
and sctp_sock_migrate() overwrite most fields.

What sctp_do_peeloff() does is more like accept().

Let's use sock_create_lite() and sctp_clone_sock().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20251023231751.4168390-8-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/ipv4/af_inet.c
net/sctp/socket.c