]> 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, 16 Nov 2011 01:46:55 +0000 (12:46 +1100)
commit2c73c1e8e3e31ff8f0fbd8d6296df1e17267cd24
tree958c8fe2a07feb8107eb990785a10b15140b85c0
parentc3280d19d388e59ee99e7a0f7de84c1732286b67
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