linux-stable/net/sctp
Kuniyuki Iwashima f69112de70 sctp: Call inet6_destroy_sock() via sk->sk_destruct().
commit 6431b0f6ff upstream.

After commit d38afeec26 ("tcp/udp: Call inet6_destroy_sock()
in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in
sk->sk_destruct() by setting inet6_sock_destruct() to it to make
sure we do not leak inet6-specific resources.

SCTP sets its own sk->sk_destruct() in the sctp_init_sock(), and
SCTPv6 socket reuses it as the init function.

To call inet6_sock_destruct() from SCTPv6 sk->sk_destruct(), we
set sctp_v6_destruct_sock() in a new init function.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 11:27:42 +02:00
..
associola.c sctp: leave the err path free in sctp_stream_init to sctp_stream_free 2022-08-03 12:00:49 +02:00
auth.c sctp: handle the error returned from sctp_auth_asoc_init_active_key 2022-10-26 13:25:23 +02:00
bind_addr.c sctp: fail if no bound addresses can be used for a given scope 2023-02-01 08:23:25 +01:00
chunk.c
debug.c
diag.c sctp: sctp_sock_filter(): avoid list_entry() on possibly empty list 2023-02-22 12:55:57 +01:00
endpointola.c sctp: use call_rcu to free endpoint 2022-01-05 12:40:30 +01:00
input.c sctp: read sk->sk_bound_dev_if once in sctp_rcv() 2022-06-09 10:21:09 +02:00
inqueue.c
ipv6.c sctp: validate from_addr_param return 2021-07-19 09:44:55 +02:00
Kconfig
Makefile
objcnt.c
offload.c
output.c
outqueue.c sctp: clear out_curr if all frag chunks of current msg are pruned 2022-11-25 17:45:43 +01:00
primitive.c
proc.c
protocol.c ip: Fix data-races around sysctl_ip_nonlocal_bind. 2022-07-29 17:19:12 +02:00
sm_make_chunk.c sctp: account stream padding length for reconf chunk 2021-10-20 11:45:03 +02:00
sm_sideeffect.c sctp: check asoc strreset_chunk in sctp_generate_reconf_event 2022-05-09 09:05:03 +02:00
sm_statefuns.c sctp: fix the processing for INIT chunk 2022-03-19 13:44:42 +01:00
sm_statetable.c
socket.c sctp: Call inet6_destroy_sock() via sk->sk_destruct(). 2023-04-26 11:27:42 +02:00
stream.c sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:23:57 +01:00
stream_interleave.c sctp: fix a potential overflow in sctp_ifwdtsn_skip 2023-04-20 12:10:26 +02:00
stream_sched.c sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:23:57 +01:00
stream_sched_prio.c sctp: add a refcnt in sctp_stream_priorities to avoid a nested loop 2023-03-11 16:40:12 +01:00
stream_sched_rr.c sctp: fix memory leak in sctp_stream_outq_migrate() 2022-12-08 11:23:57 +01:00
sysctl.c sctp: sysctl: make extra pointers netns aware 2023-01-14 10:15:44 +01:00
transport.c
tsnmap.c
ulpevent.c
ulpqueue.c