Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ipc/mqueue: update maximums for the mqueue subsystem
Commit b231cca ("message queues: increase range limits") changed the maximum size of a message in a message queue from INT_MAX to 8192*128. Unfortunately, we had customers that relied on a size much larger than 8192*128 on their production systems. After reviewing POSIX, we found that it is silent on the maximum message size. We did find a couple other areas in which it was not silent. Fix up the mqueue maximums so that the customer's system can continue to work, and document both the POSIX and real world requirements in ipc_namespace.h so that we don't have this issue crop back up. Also, commit 9cf18e1 ("ipc: HARD_MSGMAX should be higher not lower on 64bit") fiddled with HARD_MSGMAX without realizing that the number was intentionally in place to limit the msg queue depth to one that was small enough to kmalloc an array of pointers (hence why we divided 128k by sizeof(long)). If we wish to meet POSIX requirements, we have no choice but to change our allocation to a vmalloc instead (at least for the large queue size case). With that, it's possible to increase our allowed maximum to the POSIX requirements (or more if we choose). [[email protected]: using vmalloc requires including vmalloc.h] Signed-off-by: Doug Ledford <[email protected]> Cc: Serge E. Hallyn <[email protected]> Cc: Amerigo Wang <[email protected]> Cc: Joe Korty <[email protected]> Cc: Jiri Slaby <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Cc: Manfred Spraul <[email protected]> Signed-off-by: Stephen Rothwell <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information