o sctp: use revised net module infrastructure

Using sk_set_owner and having THIS_MODULE in the struct proto_ops registered
with the core.
parent 0109f7bc
......@@ -508,6 +508,7 @@ struct sock *sctp_v6_create_accept_sk(struct sock *sk,
goto out;
sock_init_data(NULL, newsk);
sk_set_owner(newsk, THIS_MODULE);
newsk->type = SOCK_STREAM;
......@@ -749,6 +750,7 @@ static int sctp_inet6_supported_addrs(const struct sctp_opt *opt,
static struct proto_ops inet6_seqpacket_ops = {
.family = PF_INET6,
.owner = THIS_MODULE,
.release = inet6_release,
.bind = inet6_bind,
.connect = inet_dgram_connect,
......
......@@ -499,6 +499,7 @@ struct sock *sctp_v4_create_accept_sk(struct sock *sk,
goto out;
sock_init_data(NULL, newsk);
sk_set_owner(newsk, THIS_MODULE);
newsk->type = SOCK_STREAM;
......@@ -748,6 +749,7 @@ struct notifier_block sctp_inetaddr_notifier = {
/* Socket operations. */
struct proto_ops inet_seqpacket_ops = {
.family = PF_INET,
.owner = THIS_MODULE,
.release = inet_release, /* Needs to be wrapped... */
.bind = inet_bind,
.connect = inet_dgram_connect,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment