summaryrefslogtreecommitdiff
path: root/scripts/subarch.include
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2026-04-18 00:09:40 +0300
committerJakub Kicinski <kuba@kernel.org>2026-04-23 06:31:24 +0300
commit7c9b012d6367a335f1e91da28401a7c612305a46 (patch)
treeb3f8c26da30d4b81399c06a446ff8ad835ad4f41 /scripts/subarch.include
parent0db1688072218bfbbfc0bbdee48bc7820da9e3cd (diff)
downloadlinux-7c9b012d6367a335f1e91da28401a7c612305a46.tar.xz
sctp: fix sockets_allocated imbalance after sk_clone()
sk_clone() increments sockets_allocated and sets the socket refcount to 2. SCTP performs additional accounting in sctp_clone_sock(), so the clone-time increment must be undone to avoid double counting. Note we cannot simply remove the SCTP-side increment, because the SCTP destroy path in sctp_destroy_sock() only decrements sockets_allocated when sp->ep is set, which may not be true for all failure paths in sctp_clone_sock(). Fixes: 16942cf4d3e3 ("sctp: Use sk_clone() in sctp_accept().") Signed-off-by: Xin Long <lucien.xin@gmail.com> Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com> Link: https://patch.msgid.link/af8d66f928dec3e9fcbee8d4a85b7d5a6b86f515.1776460180.git.lucien.xin@gmail.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'scripts/subarch.include')
0 files changed, 0 insertions, 0 deletions