diff options
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/associola.c | 3 | ||||
-rw-r--r-- | net/sctp/sm_statefuns.c | 2 | ||||
-rw-r--r-- | net/sctp/transport.c | 8 |
3 files changed, 8 insertions, 5 deletions
diff --git a/net/sctp/associola.c b/net/sctp/associola.c index 6bcbecafe393..93a4513c85e0 100644 --- a/net/sctp/associola.c +++ b/net/sctp/associola.c | |||
@@ -641,6 +641,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, | |||
641 | const gfp_t gfp, | 641 | const gfp_t gfp, |
642 | const int peer_state) | 642 | const int peer_state) |
643 | { | 643 | { |
644 | struct net *net = sock_net(asoc->base.sk); | ||
644 | struct sctp_transport *peer; | 645 | struct sctp_transport *peer; |
645 | struct sctp_sock *sp; | 646 | struct sctp_sock *sp; |
646 | unsigned short port; | 647 | unsigned short port; |
@@ -674,7 +675,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc, | |||
674 | return peer; | 675 | return peer; |
675 | } | 676 | } |
676 | 677 | ||
677 | peer = sctp_transport_new(addr, gfp); | 678 | peer = sctp_transport_new(net, addr, gfp); |
678 | if (!peer) | 679 | if (!peer) |
679 | return NULL; | 680 | return NULL; |
680 | 681 | ||
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index bee5e2c288d8..ff2530c848b0 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c | |||
@@ -5958,7 +5958,7 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net, | |||
5958 | } | 5958 | } |
5959 | 5959 | ||
5960 | /* Make a transport for the bucket, Eliza... */ | 5960 | /* Make a transport for the bucket, Eliza... */ |
5961 | transport = sctp_transport_new(sctp_source(chunk), GFP_ATOMIC); | 5961 | transport = sctp_transport_new(net, sctp_source(chunk), GFP_ATOMIC); |
5962 | if (!transport) | 5962 | if (!transport) |
5963 | goto nomem; | 5963 | goto nomem; |
5964 | 5964 | ||
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index c97472b248a2..aada963c9d6b 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -59,7 +59,8 @@ | |||
59 | /* 1st Level Abstractions. */ | 59 | /* 1st Level Abstractions. */ |
60 | 60 | ||
61 | /* Initialize a new transport from provided memory. */ | 61 | /* Initialize a new transport from provided memory. */ |
62 | static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | 62 | static struct sctp_transport *sctp_transport_init(struct net *net, |
63 | struct sctp_transport *peer, | ||
63 | const union sctp_addr *addr, | 64 | const union sctp_addr *addr, |
64 | gfp_t gfp) | 65 | gfp_t gfp) |
65 | { | 66 | { |
@@ -109,7 +110,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer, | |||
109 | } | 110 | } |
110 | 111 | ||
111 | /* Allocate and initialize a new transport. */ | 112 | /* Allocate and initialize a new transport. */ |
112 | struct sctp_transport *sctp_transport_new(const union sctp_addr *addr, | 113 | struct sctp_transport *sctp_transport_new(struct net *net, |
114 | const union sctp_addr *addr, | ||
113 | gfp_t gfp) | 115 | gfp_t gfp) |
114 | { | 116 | { |
115 | struct sctp_transport *transport; | 117 | struct sctp_transport *transport; |
@@ -118,7 +120,7 @@ struct sctp_transport *sctp_transport_new(const union sctp_addr *addr, | |||
118 | if (!transport) | 120 | if (!transport) |
119 | goto fail; | 121 | goto fail; |
120 | 122 | ||
121 | if (!sctp_transport_init(transport, addr, gfp)) | 123 | if (!sctp_transport_init(net, transport, addr, gfp)) |
122 | goto fail_init; | 124 | goto fail_init; |
123 | 125 | ||
124 | transport->malloced = 1; | 126 | transport->malloced = 1; |