diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-21 11:54:47 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2020-03-21 11:54:47 -0700 |
commit | 1ab7ea1f83d16489142bcfa1b7670ac7ca86cd81 (patch) | |
tree | e57f1ce4dc6dadb29611d4d7fde2a37d33087f48 /include/linux | |
parent | 6c1bae744d5a15108c412336d95f3c4e5db6aff4 (diff) | |
parent | 09952e3e7826119ddd4357c453d54bcc7ef25156 (diff) | |
download | linux-stable-1ab7ea1f83d16489142bcfa1b7670ac7ca86cd81.tar.gz linux-stable-1ab7ea1f83d16489142bcfa1b7670ac7ca86cd81.tar.bz2 linux-stable-1ab7ea1f83d16489142bcfa1b7670ac7ca86cd81.zip |
Merge tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-block
Pull io_uring fixes from Jens Axboe:
"Two different fixes in here:
- Fix for a potential NULL pointer deref for links with async or
drain marked (Pavel)
- Fix for not properly checking RLIMIT_NOFILE for async punted
operations.
This affects openat/openat2, which were added this cycle, and
accept4. I did a full audit of other cases where we might check
current->signal->rlim[] and found only RLIMIT_FSIZE for buffered
writes and fallocate. That one is fixed and queued for 5.7 and
marked stable"
* tag 'io_uring-5.6-20200320' of git://git.kernel.dk/linux-block:
io_uring: make sure accept honor rlimit nofile
io_uring: make sure openat/openat2 honor rlimit nofile
io_uring: NULL-deref for IOSQE_{ASYNC,DRAIN}
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/file.h | 1 | ||||
-rw-r--r-- | include/linux/socket.h | 3 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/file.h b/include/linux/file.h index c6c7b24ea9f7..142d102f285e 100644 --- a/include/linux/file.h +++ b/include/linux/file.h @@ -85,6 +85,7 @@ extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); extern int replace_fd(unsigned fd, struct file *file, unsigned flags); extern void set_close_on_exec(unsigned int fd, int flag); extern bool get_close_on_exec(unsigned int fd); +extern int __get_unused_fd_flags(unsigned flags, unsigned long nofile); extern int get_unused_fd_flags(unsigned flags); extern void put_unused_fd(unsigned int fd); diff --git a/include/linux/socket.h b/include/linux/socket.h index 2d2313403101..15f3412d481e 100644 --- a/include/linux/socket.h +++ b/include/linux/socket.h @@ -401,7 +401,8 @@ extern int __sys_sendto(int fd, void __user *buff, size_t len, int addr_len); extern int __sys_accept4_file(struct file *file, unsigned file_flags, struct sockaddr __user *upeer_sockaddr, - int __user *upeer_addrlen, int flags); + int __user *upeer_addrlen, int flags, + unsigned long nofile); extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, int __user *upeer_addrlen, int flags); extern int __sys_socket(int family, int type, int protocol); |