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}
Showing the changes to include/linux (2 of 5 files). Show all
Unified · Split
| @@ -85,6 +85,7 @@ extern int f_dupfd(unsigned int from, struct file *file, unsigned flags); · 84 unmodified lines | ||
| 85 | 85 | extern int replace_fd(unsigned fd, struct file *file, unsigned flags); |
| 86 | 86 | extern void set_close_on_exec(unsigned int fd, int flag); |
| 87 | 87 | extern bool get_close_on_exec(unsigned int fd); |
| 88 | +extern int __get_unused_fd_flags(unsigned flags, unsigned long nofile); | |
| 88 | 89 | extern int get_unused_fd_flags(unsigned flags); |
| 89 | 90 | extern void put_unused_fd(unsigned int fd); |
| 90 | 91 | |
| @@ -401,7 +401,8 @@ extern int __sys_sendto(int fd, void __user *buff, size_t len, · 400 unmodified lines | ||
| 401 | 401 | int addr_len); |
| 402 | 402 | extern int __sys_accept4_file(struct file *file, unsigned file_flags, |
| 403 | 403 | struct sockaddr __user *upeer_sockaddr, |
| 404 | − int __user *upeer_addrlen, int flags); | |
| 404 | + int __user *upeer_addrlen, int flags, | |
| 405 | + unsigned long nofile); | |
| 405 | 406 | extern int __sys_accept4(int fd, struct sockaddr __user *upeer_sockaddr, |
| 406 | 407 | int __user *upeer_addrlen, int flags); |
| 407 | 408 | extern int __sys_socket(int family, int type, int protocol); |