]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: Add sk_clone().
authorKuniyuki Iwashima <kuniyu@google.com>
Thu, 23 Oct 2025 23:16:53 +0000 (23:16 +0000)
committerJakub Kicinski <kuba@kernel.org>
Tue, 28 Oct 2025 01:04:57 +0000 (18:04 -0700)
commit151b98d10ef7c3174465e409b99d8762e7e8de60
treef6510eab756cae61ea6886ef44ad07864fa1b3fb
parentb7185792f80a0069aa4eab87cb4263a1fb611a4e
net: Add sk_clone().

sctp_accept() will use sk_clone_lock(), but it will be called
with the parent socket locked, and sctp_migrate() acquires the
child lock later.

Let's add no lock version of sk_clone_lock().

Note that lockdep complains if we simply use bh_lock_sock_nested().

Signed-off-by: Kuniyuki Iwashima <kuniyu@google.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/20251023231751.4168390-5-kuniyu@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
include/net/sock.h
net/core/sock.c