diff --git a/net/sctp/sysctl.c b/net/sctp/sysctl.c index 3ed15ea96ec3..04494f61fb48 100644 --- a/net/sctp/sysctl.c +++ b/net/sctp/sysctl.c @@ -532,7 +532,7 @@ static int proc_sctp_do_auth(struct ctl_table *ctl, int write, static int proc_sctp_do_udp_port(struct ctl_table *ctl, int write, void *buffer, size_t *lenp, loff_t *ppos) { - struct net *net = current->nsproxy->net_ns; + struct net *net = container_of(ctl->data, struct net, sctp.udp_port); unsigned int min = *(unsigned int *)ctl->extra1; unsigned int max = *(unsigned int *)ctl->extra2; struct ctl_table tbl;