]> 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>
Tue, 8 Nov 2011 00:20:00 +0000 (11:20 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 9 Nov 2011 02:10:09 +0000 (13:10 +1100)
commit4e99c5d45be289c47b0c5e9e330138a0dbfaca9f
tree9b3c6fcdad99264dd9b3f784d414ef0a5aa59467
parent391bd47a9d079a2c5c45c2f5dccdcca4d681c2ea
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>
Cc: <stable@kernel.org>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/ipc_namespace.h
ipc/mqueue.c