Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 327420
b: refs/heads/master
c: 89bf345
h: refs/heads/master
v: v3
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Aug 15, 2012
1 parent ae7b8ff commit a3dfe27
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 55e26eb95a5345a5796babac98de6d6c42771df1
refs/heads/master: 89bf3450cb9b041b1bb4bcc5e7cbdeab4545b1c1
2 changes: 1 addition & 1 deletion trunk/include/net/sctp/structs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1066,7 +1066,7 @@ struct sctp_transport {
__u64 hb_nonce;
};

struct sctp_transport *sctp_transport_new(const union sctp_addr *,
struct sctp_transport *sctp_transport_new(struct net *, const union sctp_addr *,
gfp_t);
void sctp_transport_set_owner(struct sctp_transport *,
struct sctp_association *);
Expand Down
3 changes: 2 additions & 1 deletion trunk/net/sctp/associola.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
const gfp_t gfp,
const int peer_state)
{
struct net *net = sock_net(asoc->base.sk);
struct sctp_transport *peer;
struct sctp_sock *sp;
unsigned short port;
Expand Down Expand Up @@ -674,7 +675,7 @@ struct sctp_transport *sctp_assoc_add_peer(struct sctp_association *asoc,
return peer;
}

peer = sctp_transport_new(addr, gfp);
peer = sctp_transport_new(net, addr, gfp);
if (!peer)
return NULL;

Expand Down
2 changes: 1 addition & 1 deletion trunk/net/sctp/sm_statefuns.c
Original file line number Diff line number Diff line change
Expand Up @@ -5958,7 +5958,7 @@ static struct sctp_packet *sctp_ootb_pkt_new(struct net *net,
}

/* Make a transport for the bucket, Eliza... */
transport = sctp_transport_new(sctp_source(chunk), GFP_ATOMIC);
transport = sctp_transport_new(net, sctp_source(chunk), GFP_ATOMIC);
if (!transport)
goto nomem;

Expand Down
8 changes: 5 additions & 3 deletions trunk/net/sctp/transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@
/* 1st Level Abstractions. */

/* Initialize a new transport from provided memory. */
static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
static struct sctp_transport *sctp_transport_init(struct net *net,
struct sctp_transport *peer,
const union sctp_addr *addr,
gfp_t gfp)
{
Expand Down Expand Up @@ -109,7 +110,8 @@ static struct sctp_transport *sctp_transport_init(struct sctp_transport *peer,
}

/* Allocate and initialize a new transport. */
struct sctp_transport *sctp_transport_new(const union sctp_addr *addr,
struct sctp_transport *sctp_transport_new(struct net *net,
const union sctp_addr *addr,
gfp_t gfp)
{
struct sctp_transport *transport;
Expand All @@ -118,7 +120,7 @@ struct sctp_transport *sctp_transport_new(const union sctp_addr *addr,
if (!transport)
goto fail;

if (!sctp_transport_init(transport, addr, gfp))
if (!sctp_transport_init(net, transport, addr, gfp))
goto fail_init;

transport->malloced = 1;
Expand Down

0 comments on commit a3dfe27

Please sign in to comment.