Merge branch 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs

Pull vfs fixes from Al Viro:
"A couple of fixes - no common topic ;-)"

[ The aio spectre patch also came in from Jens, so now we have that
doubly fixed .. ]

* 'fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs:
proc/sysctl: don't return ENOMEM on lookup when a table is unregistering
aio: fix spectre gadget in lookup_ioctx

Changed files
+6 -7
fs
+6 -7
fs/proc/proc_sysctl.c
··· 464 464 465 465 inode = new_inode(sb); 466 466 if (!inode) 467 - goto out; 467 + return ERR_PTR(-ENOMEM); 468 468 469 469 inode->i_ino = get_next_ino(); 470 470 ··· 474 474 if (unlikely(head->unregistering)) { 475 475 spin_unlock(&sysctl_lock); 476 476 iput(inode); 477 - inode = NULL; 478 - goto out; 477 + return ERR_PTR(-ENOENT); 479 478 } 480 479 ei->sysctl = head; 481 480 ei->sysctl_entry = table; ··· 499 500 if (root->set_ownership) 500 501 root->set_ownership(head, table, &inode->i_uid, &inode->i_gid); 501 502 502 - out: 503 503 return inode; 504 504 } 505 505 ··· 547 549 goto out; 548 550 } 549 551 550 - err = ERR_PTR(-ENOMEM); 551 552 inode = proc_sys_make_inode(dir->i_sb, h ? h : head, p); 552 - if (!inode) 553 + if (IS_ERR(inode)) { 554 + err = ERR_CAST(inode); 553 555 goto out; 556 + } 554 557 555 558 d_set_d_op(dentry, &proc_sys_dentry_operations); 556 559 err = d_splice_alias(inode, dentry); ··· 684 685 if (d_in_lookup(child)) { 685 686 struct dentry *res; 686 687 inode = proc_sys_make_inode(dir->d_sb, head, table); 687 - if (!inode) { 688 + if (IS_ERR(inode)) { 688 689 d_lookup_done(child); 689 690 dput(child); 690 691 return false;