android_kernel_google_msm/fs
Sage Weil 8c29257456 vfs: fix propagation of atomic_open create error on negative dentry
If ->atomic_open() returns -ENOENT, we take care to return the create
error (e.g., EACCES), if any.  Do the same when ->atomic_open() returns 1
and provides a negative dentry.

This fixes a regression where an unprivileged open O_CREAT fails with
ENOENT instead of EACCES, introduced with the new atomic_open code.  It
is tested by the open/08.t test in the pjd posix test suite, and was
observed on top of fuse (backed by ceph-fuse).

Signed-off-by: Sage Weil <sage@inktank.com>
Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
Change-Id: Ie92bf84be4469484b005d0ea9b9886a0bd36d922
2018-12-07 22:28:48 +04:00
..
9p don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
adfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
affs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
afs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
autofs4 stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
befs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
bfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
btrfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
cachefiles don't pass nameidata * to vfs_create() 2018-12-07 22:28:48 +04:00
ceph don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
cifs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
coda don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
configfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
cramfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
crypto ext4/fscrypto: avoid RCU lookup in d_revalidate 2016-10-29 23:12:37 +08:00
debugfs BACKPORT: dentry name snapshots 2018-01-13 17:13:38 +03:00
devpts Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
dlm
ecryptfs don't pass nameidata * to vfs_create() 2018-12-07 22:28:48 +04:00
efs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
exofs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
exportfs move d_rcu from overlapping d_child to overlapping d_alias 2017-09-22 19:11:55 +03:00
ext2 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
ext3 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
ext4 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
f2fs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
fat don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
freevxfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
fscache FS-Cache: Handle a write to the page immediately beyond the EOF marker 2016-10-26 23:15:25 +08:00
fuse don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
gfs2 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
hfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
hfsplus don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
hostfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
hpfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
hppfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
hugetlbfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
isofs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
jbd
jbd2 jbd2: Fix unreclaimed pages after truncate in data=journal mode 2016-10-26 23:15:34 +08:00
jffs2 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
jfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
lockd lockd: Try to reconnect if statd has moved 2015-02-02 17:04:42 +08:00
logfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
minix don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
ncpfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
nfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
nfs_common
nfsd don't pass nameidata * to vfs_create() 2018-12-07 22:28:48 +04:00
nilfs2 don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
nls
notify BACKPORT: dentry name snapshots 2018-01-13 17:13:38 +03:00
ntfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
ocfs2 pull mnt_want_write()/mnt_drop_write() into kern_path_create()/done_path_create() resp. 2018-12-07 22:28:48 +04:00
omfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
openpromfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
proc fs: add nd_jump_link 2018-12-07 22:28:48 +04:00
pstore pstore: Avoid deadlock in panic and emergency-restart path 2013-03-04 06:06:43 +08:00
qnx4 stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
qnx6 stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
quota quota: Fix race between dqput() and dquot_scan_active() 2014-03-11 16:10:02 -07:00
ramfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
reiserfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
romfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
sdcardfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
squashfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
sysfs stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
sysv don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
ubifs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
udf don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
ufs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
xfs don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
yaffs2 fs: yaffs2: Add null pointer check before dereferencing inode 2013-02-27 18:19:17 -08:00
aio.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
anon_inodes.c
attr.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
bad_inode.c don't pass nameidata to ->create() 2018-12-07 22:28:00 +04:00
binfmt_aout.c
binfmt_elf.c binfmt_elf: Don't clobber passed executable's file header 2016-10-26 23:15:28 +08:00
binfmt_elf_fdpic.c
binfmt_em86.c exec: use -ELOOP for max recursion depth 2013-03-28 12:12:28 -07:00
binfmt_flat.c
binfmt_misc.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
binfmt_script.c exec: use -ELOOP for max recursion depth 2013-03-28 12:12:28 -07:00
binfmt_som.c
bio-integrity.c
bio.c SCSI: sg: Fix user memory corruption when SG_IO is interrupted by a signal 2013-09-07 21:58:16 -07:00
block_dev.c writeback: Fix periodic writeback after fs mount 2013-07-28 16:26:08 -07:00
buffer.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
char_dev.c
compat.c Fix: compat_rw_copy_check_uvector() misuse in aio, readv, writev, and security keys 2013-03-14 11:29:51 -07:00
compat_binfmt_elf.c
compat_ioctl.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
dcache.c vfs: be even more careful about dentry RCU name lookups 2018-12-07 22:20:38 +04:00
dcookies.c
direct-io.c fs: Fix possible use-after-free with AIO 2013-03-04 06:06:41 +08:00
drop_caches.c
eventfd.c
eventpoll.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
exec.c fs/exec: fix use after free in execve 2018-02-16 20:15:06 -07:00
fcntl.c
fhandle.c vfs: read file_handle only once in handle_to_path 2016-10-29 23:12:11 +08:00
fifo.c
file.c fs/file.c:fdtable: avoid triggering OOMs from alloc_fdmem 2014-02-22 10:32:45 -08:00
file_table.c get rid of s_files and files_lock 2016-03-21 09:17:55 +08:00
filesystems.c fs: Limit sys_mount to only request filesystem modules. 2017-09-22 19:12:20 +03:00
fs-writeback.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
fs_struct.c sdcardfs: override umask on mkdir and create 2017-09-22 19:12:02 +03:00
generic_acl.c BACKPORT: posix_acl: Clear SGID bit when setting file permissions 2017-06-26 20:26:17 +03:00
inode.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
internal.h kill struct opendata 2018-12-07 22:20:38 +04:00
ioctl.c
ioprio.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
Kconfig Included sdcardfs source code for kernel 3.0 2017-09-22 19:11:56 +03:00
Kconfig.binfmt
libfs.c stop passing nameidata to ->lookup() 2018-12-07 22:26:28 +04:00
locks.c locks: allow __break_lease to sleep even when break_time is 0 2014-05-13 14:11:31 +02:00
Makefile Included sdcardfs source code for kernel 3.0 2017-09-22 19:11:56 +03:00
mbcache.c
mount.h proc: Usable inode numbers for the namespace file descriptors. 2015-07-13 11:18:01 -07:00
mpage.c
namei.c vfs: fix propagation of atomic_open create error on negative dentry 2018-12-07 22:28:48 +04:00
namespace.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
no-block.c
open.c make finish_no_open() return int 2018-12-07 22:20:38 +04:00
pipe.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
pnode.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
pnode.h ANDROID: mnt: remount should propagate to slaves of slaves 2017-09-22 19:12:11 +03:00
posix_acl.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
proc_namespace.c vfs: Allow filesystems to access their private mount data 2017-09-22 19:12:06 +03:00
read_write.c
read_write.h
readdir.c kernel: Only expose su when daemon is running 2017-05-19 18:41:25 -06:00
select.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
seq_file.c fs/seq_file: Use vmalloc by default for allocations > PAGE_SIZE 2014-11-18 15:13:24 -08:00
signalfd.c
splice.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
stack.c
stat.c VFS: make vfs_fstat() use f[get|put]_light() 2014-06-07 16:02:04 -07:00
statfs.c vfs: allow O_PATH file descriptors for fstatfs() 2013-10-22 09:02:25 +01:00
super.c Merge remote-tracking branch 'stable/linux-3.4.y' into lineage-15.1 2017-12-27 17:13:15 +03:00
sync.c fs/sync.c: make sync_file_range(2) use WB_SYNC_NONE writeback 2017-12-31 13:02:49 +03:00
timerfd.c timerfd: support CLOCK_BOOTTIME clock 2017-08-27 19:07:23 +03:00
utimes.c vfs: Add setattr2 for filesystems with per mount permissions 2017-09-22 19:12:07 +03:00
xattr.c
xattr_acl.c