diff options
author | Jiri Slaby <[email protected]> | 2011-07-26 16:08:47 -0700 |
---|---|---|
committer | Linus Torvalds <[email protected]> | 2011-07-26 16:49:44 -0700 |
commit | d40dcdb0172a1ba853464983a059fb45e0aaf61a (patch) | |
tree | aa785c01ad6763c92191b86ec10f526fa772b808 /tools/perf/util/scripting-engines/trace-event-perl.c | |
parent | 04715206c0c2fd4ec5ca77fa51e3a5b41ce71492 (diff) |
ipc/mqueue.c: fix mq_open() return value
We return ENOMEM from mqueue_get_inode even when we have enough memory.
Namely in case the system rlimit of mqueue was reached. This error
propagates to mq_queue and user sees the error unexpectedly. So fix
this up to properly return EMFILE as described in the manpage:
EMFILE The process already has the maximum number of files and
message queues open.
instead of:
ENOMEM Insufficient memory.
With the previous patch we just switch to ERR_PTR/PTR_ERR/IS_ERR error
handling here.
Signed-off-by: Jiri Slaby <[email protected]>
Cc: Manfred Spraul <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Diffstat (limited to 'tools/perf/util/scripting-engines/trace-event-perl.c')
0 files changed, 0 insertions, 0 deletions