diff options
-rw-r--r-- | include/linux/socket.h | 1 | ||||
-rw-r--r-- | net/compat.c | 2 | ||||
-rw-r--r-- | net/socket.c | 9 |
3 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index f8d040434a13..e9cee272da13 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h | |||
@@ -364,5 +364,6 @@ extern int __sys_sendto(int fd, void __user *buff, size_t len, | |||
364 | extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, | 364 | extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, |
365 | int __user *upeer_addrlen, int flags); | 365 | int __user *upeer_addrlen, int flags); |
366 | extern int __sys_socket(int family, int type, int protocol); | 366 | extern int __sys_socket(int family, int type, int protocol); |
367 | extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen); | ||
367 | 368 | ||
368 | #endif /* _LINUX_SOCKET_H */ | 369 | #endif /* _LINUX_SOCKET_H */ |
diff --git a/net/compat.c b/net/compat.c index 5b3b74c5812e..bba555b1d863 100644 --- a/net/compat.c +++ b/net/compat.c | |||
@@ -814,7 +814,7 @@ COMPAT_SYSCALL_DEFINE2(socketcall, int, call, u32 __user *, args) | |||
814 | ret = __sys_socket(a0, a1, a[2]); | 814 | ret = __sys_socket(a0, a1, a[2]); |
815 | break; | 815 | break; |
816 | case SYS_BIND: | 816 | case SYS_BIND: |
817 | ret = sys_bind(a0, compat_ptr(a1), a[2]); | 817 | ret = __sys_bind(a0, compat_ptr(a1), a[2]); |
818 | break; | 818 | break; |
819 | case SYS_CONNECT: | 819 | case SYS_CONNECT: |
820 | ret = sys_connect(a0, compat_ptr(a1), a[2]); | 820 | ret = sys_connect(a0, compat_ptr(a1), a[2]); |
diff --git a/net/socket.c b/net/socket.c index 07f379e50def..291cdae97341 100644 --- a/net/socket.c +++ b/net/socket.c | |||
@@ -1462,7 +1462,7 @@ out: | |||
1462 | * the protocol layer (having also checked the address is ok). | 1462 | * the protocol layer (having also checked the address is ok). |
1463 | */ | 1463 | */ |
1464 | 1464 | ||
1465 | SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) | 1465 | int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen) |
1466 | { | 1466 | { |
1467 | struct socket *sock; | 1467 | struct socket *sock; |
1468 | struct sockaddr_storage address; | 1468 | struct sockaddr_storage address; |
@@ -1485,6 +1485,11 @@ SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) | |||
1485 | return err; | 1485 | return err; |
1486 | } | 1486 | } |
1487 | 1487 | ||
1488 | SYSCALL_DEFINE3(bind, int, fd, struct sockaddr __user *, umyaddr, int, addrlen) | ||
1489 | { | ||
1490 | return __sys_bind(fd, umyaddr, addrlen); | ||
1491 | } | ||
1492 | |||
1488 | /* | 1493 | /* |
1489 | * Perform a listen. Basically, we allow the protocol to do anything | 1494 | * Perform a listen. Basically, we allow the protocol to do anything |
1490 | * necessary for a listen, and if that works, we mark the socket as | 1495 | * necessary for a listen, and if that works, we mark the socket as |
@@ -2471,7 +2476,7 @@ SYSCALL_DEFINE2(socketcall, int, call, unsigned long __user *, args) | |||
2471 | err = __sys_socket(a0, a1, a[2]); | 2476 | err = __sys_socket(a0, a1, a[2]); |
2472 | break; | 2477 | break; |
2473 | case SYS_BIND: | 2478 | case SYS_BIND: |
2474 | err = sys_bind(a0, (struct sockaddr __user *)a1, a[2]); | 2479 | err = __sys_bind(a0, (struct sockaddr __user *)a1, a[2]); |
2475 | break; | 2480 | break; |
2476 | case SYS_CONNECT: | 2481 | case SYS_CONNECT: |
2477 | err = sys_connect(a0, (struct sockaddr __user *)a1, a[2]); | 2482 | err = sys_connect(a0, (struct sockaddr __user *)a1, a[2]); |