]> git.karo-electronics.de Git - karo-tx-linux.git/commit
ipc/mqueue: switch back to using non-max values on create
authorDoug Ledford <dledford@redhat.com>
Wed, 5 Oct 2011 00:42:32 +0000 (11:42 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Fri, 14 Oct 2011 06:19:34 +0000 (17:19 +1100)
commita8b68a5c369e710bf2040389e5b8b91d9f9a4ec3
treef4c9a7b76ee6c229c7ad6bbb7e97029be5e30f6e
parent0254d93523af8454ab4cbe8ec725034bc85cce5a
ipc/mqueue: switch back to using non-max values on create

Commit b231cca4381ee15e ("message queues: increase range limits") changed
how we create a queue that does not include an attr struct passed to open
so that it creates the queue with whatever the maximum values are.
However, if the admin has set the maximums to allow flexibility in
creating a queue (aka, both a large size and large queue are allowed, but
combined they create a queue too large for the RLIMIT_MSGQUEUE of the
user), then attempts to create a queue without an attr struct will fail.
Switch back to using acceptable defaults regardless of what the maximums
are.

Signed-off-by: Doug Ledford <dledford@redhat.com>
Cc: Amerigo Wang <amwang@redhat.com>
Cc: Serge E. Hallyn <serue@us.ibm.com>
Cc: Joe Korty <joe.korty@ccur.com>
Cc: Manfred Spraul <manfred@colorfullife.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/ipc_namespace.h
ipc/mqueue.c