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
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
Makefile
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
util.c ipc,rcu: Convert call_rcu(ipc_immediate_free) to kfree_rcu() 2011-07-20 14:10:16 -07:00
util.h