kernel-ark/ipc
Doug Ledford 113289cc08 ipc/mqueue: strengthen checks on mqueue creation
We already check the mq attr struct if it's passed in, but now that the
admin can set system wide defaults separate from maximums, it's actually
possible to set the defaults to something that would overflow.  So, if
there is no attr struct passed in to the open call, check the default
values.

While we are at it, simplify mq_attr_ok() by making it return 0 or an
error condition, so that way if we add more tests to it later, we have the
option of what error should be returned instead of the calling location
having to pick a possibly inaccurate error code.

[akpm@linux-foundation.org: s/ENOMEM/EOVERFLOW/]
Signed-off-by: Doug Ledford <dledford@redhat.com>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: Manfred Spraul <manfred@colorfullife.com>
Acked-by: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2012-05-31 17:49:31 -07:00
..
compat_mq.c ipc: initialize structure memory to zero for compat functions 2010-10-27 18:03:13 -07:00
compat.c [PATCH v3] ipc: provide generic compat versions of IPC syscalls 2012-03-15 13:13:38 -04:00
ipc_sysctl.c ipc: introduce shm_rmid_forced sysctl 2011-07-26 16:49:44 -07: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 ipc/mqueue: strengthen checks on mqueue creation 2012-05-31 17:49:31 -07:00
msg.c Fix common misspellings 2011-03-31 11:26:23 -03:00
msgutil.c security: trim security.h 2012-02-14 10:45:42 +11:00
namespace.c userns: Use cred->user_ns instead of cred->user->user_ns 2012-04-07 16:55:51 -07:00
sem.c ipc/sem.c: remove private structures from public header file 2011-11-02 16:07:01 -07:00
shm.c hugetlbfs: fix alignment of huge page requests 2012-03-21 17:54:59 -07:00
syscall.c ppc64 sys_ipc breakage in 2.6.34-rc2 2010-03-22 09:57:19 -07:00
util.c ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu() 2011-07-20 14:10:16 -07:00
util.h userns: user namespaces: convert several capable() calls 2011-03-23 19:47:08 -07:00