diff options
Diffstat (limited to 'net/socket.c')
-rw-r--r-- | net/socket.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/net/socket.c b/net/socket.c index 540013ea8620..74784dfe8e5b 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1250,11 +1250,14 @@ asmlinkage long sys_socketpair(int family, int type, int protocol, | |||
1250 | goto out_release_both; | 1250 | goto out_release_both; |
1251 | 1251 | ||
1252 | fd1 = sock_alloc_fd(&newfile1); | 1252 | fd1 = sock_alloc_fd(&newfile1); |
1253 | if (unlikely(fd1 < 0)) | 1253 | if (unlikely(fd1 < 0)) { |
1254 | err = fd1; | ||
1254 | goto out_release_both; | 1255 | goto out_release_both; |
1256 | } | ||
1255 | 1257 | ||
1256 | fd2 = sock_alloc_fd(&newfile2); | 1258 | fd2 = sock_alloc_fd(&newfile2); |
1257 | if (unlikely(fd2 < 0)) { | 1259 | if (unlikely(fd2 < 0)) { |
1260 | err = fd2; | ||
1258 | put_filp(newfile1); | 1261 | put_filp(newfile1); |
1259 | put_unused_fd(fd1); | 1262 | put_unused_fd(fd1); |
1260 | goto out_release_both; | 1263 | goto out_release_both; |
@@ -2316,6 +2319,11 @@ int kernel_sock_ioctl(struct socket *sock, int cmd, unsigned long arg) | |||
2316 | return err; | 2319 | return err; |
2317 | } | 2320 | } |
2318 | 2321 | ||
2322 | int kernel_sock_shutdown(struct socket *sock, enum sock_shutdown_cmd how) | ||
2323 | { | ||
2324 | return sock->ops->shutdown(sock, how); | ||
2325 | } | ||
2326 | |||
2319 | /* ABI emulation layers need these two */ | 2327 | /* ABI emulation layers need these two */ |
2320 | EXPORT_SYMBOL(move_addr_to_kernel); | 2328 | EXPORT_SYMBOL(move_addr_to_kernel); |
2321 | EXPORT_SYMBOL(move_addr_to_user); | 2329 | EXPORT_SYMBOL(move_addr_to_user); |
@@ -2342,3 +2350,4 @@ EXPORT_SYMBOL(kernel_getsockopt); | |||
2342 | EXPORT_SYMBOL(kernel_setsockopt); | 2350 | EXPORT_SYMBOL(kernel_setsockopt); |
2343 | EXPORT_SYMBOL(kernel_sendpage); | 2351 | EXPORT_SYMBOL(kernel_sendpage); |
2344 | EXPORT_SYMBOL(kernel_sock_ioctl); | 2352 | EXPORT_SYMBOL(kernel_sock_ioctl); |
2353 | EXPORT_SYMBOL(kernel_sock_shutdown); | ||