sctp: get netns from asoc and ep base
Commit 312434617c
("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 <marcelo.leitner@gmail.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
26c97a2d82
commit
4e7696d90b
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user