linux/ipc
Anatol Pomozov 39b6525274 fs: Preserve error code in get_empty_filp(), part 2
Allocating a file structure in function get_empty_filp() might fail because
of several reasons:
 - not enough memory for file structures
 - operation is not allowed
 - user is over its limit

Currently the function returns NULL in all cases and we loose the exact
reason of the error. All callers of get_empty_filp() assume that the function
can fail with ENFILE only.

Return error through pointer. Change all callers to preserve this error code.

[AV: cleaned up a bit, carved the get_empty_filp() part out into a separate commit
(things remaining here deal with alloc_file()), removed pipe(2) behaviour change]

Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com>
Reviewed-by: "Theodore Ts'o" <tytso@mit.edu>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2013-02-22 23:31:32 -05:00
..
compat_mq.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
compat.c selftests: IPC message queue copy feature test 2013-01-04 16:11:45 -08:00
ipc_sysctl.c ipc: add sysctl to specify desired next object id 2013-01-04 16:11:45 -08:00
ipcns_notifier.c ipc: do not use a negative value to re-enable msgmni automatic recomputing 2008-07-25 10:53:42 -07:00
Makefile Add generic sys_ipc wrapper 2010-03-12 15:52:32 -08:00
mq_sysctl.c mqueue: separate mqueue default value from maximum value 2012-05-31 17:49:31 -07:00
mqueue.c new helper: file_inode(file) 2013-02-22 23:31:31 -05:00
msg.c ipc: add more comments to message copying related code 2013-01-04 16:11:46 -08:00
msgutil.c ipc: simplify message copying 2013-01-04 16:11:46 -08:00
namespace.c userns: Require CAP_SYS_ADMIN for most uses of setns. 2012-12-14 16:12:03 -08:00
sem.c userns: Convert ipc to use kuid and kgid where appropriate 2012-09-06 22:17:20 -07:00
shm.c fs: Preserve error code in get_empty_filp(), part 2 2013-02-22 23:31:32 -05:00
syscall.c ipc: add COMPAT_SHMLBA support 2012-07-30 17:25:20 -07:00
util.c ipc: add sysctl to specify desired next object id 2013-01-04 16:11:45 -08:00
util.h ipc: introduce message queue copy feature 2013-01-04 16:11:45 -08:00