diff options
| author | Gabriel Krisman Bertazi <[email protected]> | 2024-06-14 12:30:44 -0400 |
|---|---|---|
| committer | Jens Axboe <[email protected]> | 2024-06-19 07:57:20 -0600 |
| commit | dc2e77979412d289df9049d8c693761db8602867 (patch) | |
| tree | 0a99e77cbd381c1d6ea129619d6aadbf8df69695 /include/linux | |
| parent | 3b87184f7eff27fef7d7ee18b65f173152e1bb81 (diff) | |
net: Split a __sys_bind helper for io_uring
io_uring holds a reference to the file and maintains a
sockaddr_storage address. Similarly to what was done to
__sys_connect_file, split an internal helper for __sys_bind in
preparation to supporting an io_uring bind command.
Reviewed-by: Jens Axboe <[email protected]>
Signed-off-by: Gabriel Krisman Bertazi <[email protected]>
Reviewed-by: Kuniyuki Iwashima <[email protected]>
Acked-by: Jakub Kicinski <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Jens Axboe <[email protected]>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/socket.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/socket.h b/include/linux/socket.h index 89d16b90370b..b3000f49e9f5 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -442,6 +442,8 @@ extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, extern int __sys_socket(int family, int type, int protocol); extern struct file *__sys_socket_file(int family, int type, int protocol); extern int __sys_bind(int fd, struct sockaddr __user *umyaddr, int addrlen); +extern int __sys_bind_socket(struct socket *sock, struct sockaddr_storage *address, + int addrlen); extern int __sys_connect_file(struct file *file, struct sockaddr_storage *addr, int addrlen, int file_flags); extern int __sys_connect(int fd, struct sockaddr __user *uservaddr, |