diff options
| author | Xin Long <[email protected]> | 2019-12-09 05:45:18 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2019-12-10 04:14:01 +0000 |
| commit | 4e7696d90b51a1a73ce0e8174f3aff58b914619c (patch) | |
| tree | f70df63734043ccdfbba56fde42084fa8fb1b19a /net/sctp/sm_statefuns.c | |
| parent | net: sfp: avoid tx-fault with Nokia GPON module (diff) | |
| download | kernel-4e7696d90b51a1a73ce0e8174f3aff58b914619c.tar.gz kernel-4e7696d90b51a1a73ce0e8174f3aff58b914619c.zip | |
sctp: get netns from asoc and ep base
Commit 312434617cb1 ("sctp: cache netns in sctp_ep_common") set netns
in asoc and ep base since they're created, and it will never change.
It's a better way to get netns from asoc and ep base, comparing to
calling sock_net().
This patch is to replace them.
v1->v2:
- no change.
Suggested-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: Xin Long <[email protected]>
Acked-by: Neil Horman <[email protected]>
Acked-by: Marcelo Ricardo Leitner <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
Diffstat (limited to 'net/sctp/sm_statefuns.c')
| -rw-r--r-- | net/sctp/sm_statefuns.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 4ab8208a2dd4..42558fa3f3e4 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -1320,7 +1320,7 @@ static int sctp_sf_check_restart_addrs(const struct sctp_association *new_asoc, struct sctp_chunk *init, struct sctp_cmd_seq *commands) { - struct net *net = sock_net(new_asoc->base.sk); + struct net *net = new_asoc->base.net; struct sctp_transport *new_addr; int ret = 1; |
