Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull file descriptor fix from Al Viro:
"Fix for breakage in #work.fd this window"

* tag 'pull-work.fd-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
fix the breakage in close_fd_get_file() calling conventions change

+4 -6
+2
drivers/android/binder.c
··· 1886 1886 init_task_work(&twcb->twork, binder_do_fd_close); 1887 1887 twcb->file = close_fd_get_file(fd); 1888 1888 if (twcb->file) { 1889 + // pin it until binder_do_fd_close(); see comments there 1890 + get_file(twcb->file); 1889 1891 filp_close(twcb->file, current->files); 1890 1892 task_work_add(current, &twcb->twork, TWA_RESUME); 1891 1893 } else {
+1 -2
fs/file.c
··· 800 800 801 801 /* 802 802 * variant of close_fd that gets a ref on the file for later fput. 803 - * The caller must ensure that filp_close() called on the file, and then 804 - * an fput(). 803 + * The caller must ensure that filp_close() called on the file. 805 804 */ 806 805 struct file *close_fd_get_file(unsigned int fd) 807 806 {
+1 -4
fs/io_uring.c
··· 6010 6010 struct files_struct *files = current->files; 6011 6011 struct io_close *close = &req->close; 6012 6012 struct fdtable *fdt; 6013 - struct file *file = NULL; 6013 + struct file *file; 6014 6014 int ret = -EBADF; 6015 6015 6016 6016 if (req->close.file_slot) { ··· 6029 6029 lockdep_is_held(&files->file_lock)); 6030 6030 if (!file || file->f_op == &io_uring_fops) { 6031 6031 spin_unlock(&files->file_lock); 6032 - file = NULL; 6033 6032 goto err; 6034 6033 } 6035 6034 ··· 6048 6049 err: 6049 6050 if (ret < 0) 6050 6051 req_set_fail(req); 6051 - if (file) 6052 - fput(file); 6053 6052 __io_req_complete(req, issue_flags, ret, 0); 6054 6053 return 0; 6055 6054 }