linux_dsm_epyc7002/fs
Eric Biggers e9bb1f9b12 fs/pipe.c: preserve alloc_file() error code
If sys_pipe() was unable to allocate a 'struct file', it always failed
with ENFILE, which means "The number of simultaneously open files in the
system would exceed a system-imposed limit." However, alloc_file()
actually returns an ERR_PTR value and might fail with other error codes.
Currently, in addition to ENFILE, it can fail with ENOMEM, potentially
when there are few open files in the system.  Update sys_pipe() to
preserve this error code.

In a prior submission of a similar patch (1) some concern was raised
about introducing a new error code for sys_pipe().  However, for most
system calls, programs cannot assume that new error codes will never be
introduced.  In addition, ENOMEM was, in fact, already a possible error
code for sys_pipe(), in the case where the file descriptor table could
not be expanded due to insufficient memory.

	(1) http://comments.gmane.org/gmane.linux.kernel/1357942

Signed-off-by: Eric Biggers <ebiggers3@gmail.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2015-11-11 02:18:23 -05:00
..
9p
adfs
affs
afs
autofs4
befs
bfs
btrfs Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
cachefiles FS-Cache: Handle a write to the page immediately beyond the EOF marker 2015-11-11 02:11:02 -05:00
ceph mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
cifs Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
coda
configfs
cramfs
debugfs debugfs: fix refcount imbalance in start_creating 2015-11-11 02:04:44 -05:00
devpts
dlm
ecryptfs Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial 2015-11-07 13:05:44 -08:00
efivarfs
efs
exofs
exportfs
ext2
ext4 Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
f2fs
fat
freevxfs
fscache FS-Cache: Handle a write to the page immediately beyond the EOF marker 2015-11-11 02:11:02 -05:00
fuse
gfs2
hfs
hfsplus
hostfs
hpfs
hugetlbfs
isofs
jbd2 Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
jffs2 Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
jfs
kernfs
lockd
logfs mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
minix
ncpfs
nfs Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
nfs_common
nfsd
nilfs2 nilfs2: fix gcc uninitialized-variable warnings in powerpc build 2015-11-06 17:50:42 -08:00
nls
notify
ntfs mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
ocfs2
omfs
openpromfs
overlayfs
proc Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
pstore
qnx4
qnx6
quota
ramfs
reiserfs
romfs
squashfs
sysfs
sysv
tracefs
ubifs
udf
ufs
xfs mm, page_alloc: distinguish between being unable to sleep, unwilling to sleep and avoiding waking kswapd 2015-11-06 17:50:42 -08:00
aio.c
anon_inodes.c
attr.c
bad_inode.c
binfmt_aout.c
binfmt_elf_fdpic.c
binfmt_elf.c binfmt_elf: Don't clobber passed executable's file header 2015-11-11 02:18:07 -05:00
binfmt_em86.c
binfmt_flat.c
binfmt_misc.c
binfmt_script.c
block_dev.c
buffer.c mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
char_dev.c
compat_binfmt_elf.c
compat_ioctl.c
compat.c
coredump.c coredump: change zap_threads() and zap_process() to use for_each_thread() 2015-11-06 17:50:42 -08:00
dax.c
dcache.c
dcookies.c
direct-io.c mm, page_alloc: rename __GFP_WAIT to __GFP_RECLAIM 2015-11-06 17:50:42 -08:00
drop_caches.c
eventfd.c
eventpoll.c
exec.c
fcntl.c
fhandle.c
file_table.c
file.c
filesystems.c
fs_pin.c
fs_struct.c
fs-writeback.c
inode.c
internal.h
ioctl.c
Kconfig
Kconfig.binfmt
libfs.c
locks.c
Makefile
mbcache.c
mount.h
mpage.c mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
namei.c Merge branch 'akpm' (patches from Andrew) 2015-11-07 14:32:45 -08:00
namespace.c
no-block.c
nsfs.c
open.c
pipe.c fs/pipe.c: preserve alloc_file() error code 2015-11-11 02:18:23 -05:00
pnode.c
pnode.h
posix_acl.c
proc_namespace.c
read_write.c
readdir.c
select.c
seq_file.c fs, seqfile: always allow oom killer 2015-11-06 17:50:42 -08:00
signalfd.c
splice.c mm, fs: introduce mapping_gfp_constraint() 2015-11-06 17:50:42 -08:00
stack.c
stat.c
statfs.c
super.c
sync.c fs/sync.c: make sync_file_range(2) use WB_SYNC_NONE writeback 2015-11-06 17:50:42 -08:00
timerfd.c
userfaultfd.c
utimes.c
xattr.c