linux-stable/net/sctp
Kuniyuki Iwashima 0e0ec736a4 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:18:58 +02:00
..
associola.c sctp: Don't advertise IPv4 addresses if ipv6only is set on the socket 2020-06-30 15:37:59 -04:00
auth.c sctp: fix sctp_auth_init_hmacs() error path 2020-10-14 09:51:12 +02:00
bind_addr.c sctp: fail if no bound addresses can be used for a given scope 2023-02-06 07:46:32 +01:00
chunk.c sctp: fix erroneous inc of snmp SctpFragUsrMsgs 2018-08-24 13:09:03 +02:00
debug.c sctp: remove the typedef sctp_subtype_t 2017-08-06 21:33:42 -07:00
endpointola.c sctp: use call_rcu to free endpoint 2022-01-05 12:33:49 +01:00
input.c sctp: read sk->sk_bound_dev_if once in sctp_rcv() 2022-06-14 16:53:50 +02:00
inqueue.c sctp: fix the issue that the cookie-ack with auth can't get processed 2018-05-19 10:20:25 +02:00
ipv6.c sctp: validate from_addr_param return 2021-07-20 16:17:45 +02:00
Kconfig
Makefile License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
objcnt.c sctp: remove the typedef sctp_dbg_objcnt_entry_t 2017-08-11 10:02:43 -07:00
offload.c sctp: call gso_reset_checksum when computing checksum in sctp_gso_segment 2019-02-27 10:08:06 +01:00
output.c sctp: remove the typedef sctp_xmit_t 2017-08-06 21:33:42 -07:00
outqueue.c sctp: only update outstanding_bytes for transmitted queue when doing prsctp_prune 2018-02-25 11:07:57 +01:00
primitive.c sctp: remove the typedef sctp_subtype_t 2017-08-06 21:33:42 -07:00
probe.c sctp: remove the typedef sctp_disposition_t 2017-08-11 10:02:44 -07:00
proc.c sctp: hold transport before accessing its asoc in sctp_transport_get_next 2018-09-15 09:45:25 +02:00
protocol.c sctp: move 198 addresses from unusable to private scope 2021-08-04 12:22:15 +02:00
sctp_diag.c sctp: fix kernel-infoleak for SCTP sockets 2022-03-16 12:57:07 +01:00
sm_make_chunk.c sctp: account stream padding length for reconf chunk 2021-10-20 10:42:05 +02:00
sm_sideeffect.c sctp: check asoc strreset_chunk in sctp_generate_reconf_event 2022-05-12 12:17:07 +02:00
sm_statefuns.c sctp: fix the processing for INIT_ACK chunk 2022-03-23 09:01:34 +01:00
sm_statetable.c sctp: remove the typedef sctp_sm_table_entry_t 2017-08-11 10:02:44 -07:00
socket.c sctp: Call inet6_destroy_sock() via sk->sk_destruct(). 2023-04-26 11:18:58 +02:00
stream.c sctp: improve the events for sctp stream reset 2019-02-06 17:31:33 +01:00
sysctl.c sctp: remove the typedef sctp_scope_policy_t 2017-08-06 21:33:41 -07:00
transport.c sctp: do not check hb_timer.expires when resetting hb_timer 2023-02-22 12:46:01 +01:00
tsnmap.c
ulpevent.c sctp: remove sctp_chunk_put from fail_mark err path in sctp_ulpevent_make_rcvmsg 2018-05-19 10:20:25 +02:00
ulpqueue.c sctp: fix the issue that a __u16 variable may overflow in sctp_ulpq_renege 2018-03-03 10:24:24 +01:00