diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/socket.c b/net/socket.c index 9d3fbfbc8535..79e5382fd110 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -857,7 +857,7 @@ static long sock_ioctl(struct file *file, unsigned cmd, unsigned long arg) | |||
857 | 857 | ||
858 | sock = file->private_data; | 858 | sock = file->private_data; |
859 | sk = sock->sk; | 859 | sk = sock->sk; |
860 | net = sk->sk_net; | 860 | net = sock_net(sk); |
861 | if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { | 861 | if (cmd >= SIOCDEVPRIVATE && cmd <= (SIOCDEVPRIVATE + 15)) { |
862 | err = dev_ioctl(net, cmd, argp); | 862 | err = dev_ioctl(net, cmd, argp); |
863 | } else | 863 | } else |
@@ -1375,7 +1375,7 @@ asmlinkage long sys_listen(int fd, int backlog) | |||
1375 | 1375 | ||
1376 | sock = sockfd_lookup_light(fd, &err, &fput_needed); | 1376 | sock = sockfd_lookup_light(fd, &err, &fput_needed); |
1377 | if (sock) { | 1377 | if (sock) { |
1378 | somaxconn = sock->sk->sk_net->sysctl_somaxconn; | 1378 | somaxconn = sock_net(sock->sk)->sysctl_somaxconn; |
1379 | if ((unsigned)backlog > somaxconn) | 1379 | if ((unsigned)backlog > somaxconn) |
1380 | backlog = somaxconn; | 1380 | backlog = somaxconn; |
1381 | 1381 | ||