Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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. [[email protected]: s/ENOMEM/EOVERFLOW/] Signed-off-by: Doug Ledford <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Manfred Spraul <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
- Loading branch information