Commit 298fbb8
Xin Long
sctp: Call inet6_destroy_sock() via sk->sk_destruct().
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=2160516
Tested: compile only
commit 6431b0f
Author: Kuniyuki Iwashima <kuniyu@amazon.com>
Date: Wed Oct 19 15:36:01 2022 -0700
sctp: Call inet6_destroy_sock() via sk->sk_destruct().
After commit d38afee ("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: Xin Long <lxin@redhat.com>1 parent 67bf533 commit 298fbb8
1 file changed
+21
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5099 | 5099 | | |
5100 | 5100 | | |
5101 | 5101 | | |
5102 | | - | |
| 5102 | + | |
5103 | 5103 | | |
5104 | 5104 | | |
5105 | 5105 | | |
5106 | 5106 | | |
5107 | 5107 | | |
| 5108 | + | |
5108 | 5109 | | |
| 5110 | + | |
| 5111 | + | |
| 5112 | + | |
5109 | 5113 | | |
5110 | 5114 | | |
5111 | 5115 | | |
| |||
9429 | 9433 | | |
9430 | 9434 | | |
9431 | 9435 | | |
9432 | | - | |
| 9436 | + | |
9433 | 9437 | | |
9434 | 9438 | | |
9435 | 9439 | | |
| |||
9664 | 9668 | | |
9665 | 9669 | | |
9666 | 9670 | | |
9667 | | - | |
9668 | | - | |
| 9671 | + | |
| 9672 | + | |
| 9673 | + | |
| 9674 | + | |
| 9675 | + | |
| 9676 | + | |
| 9677 | + | |
9669 | 9678 | | |
9670 | | - | |
9671 | | - | |
| 9679 | + | |
| 9680 | + | |
| 9681 | + | |
| 9682 | + | |
| 9683 | + | |
| 9684 | + | |
9672 | 9685 | | |
9673 | 9686 | | |
9674 | 9687 | | |
| |||
9678 | 9691 | | |
9679 | 9692 | | |
9680 | 9693 | | |
9681 | | - | |
9682 | | - | |
| 9694 | + | |
| 9695 | + | |
9683 | 9696 | | |
9684 | 9697 | | |
9685 | 9698 | | |
| |||
0 commit comments