lkml.org 
[lkml]   [2004]   [Apr]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] per-user signal pending and message queue limits
Marcelo Tosatti wrote:

>@@ -849,6 +892,10 @@ asmlinkage long sys_mq_timedsend(mqd_t m
> goto out_fput;
> }
>
>+ if(current->user->msg_queues + msg_len
>+ >= current->rlim[RLIMIT_MSGQUEUE].rlim_cur)
>+ goto out_fput;
>+
>
I don't like that:
The opengroup manpage doesn't mention out of memory as an error code for
mq_send(). I'd prefer if mq_open would check that
->mq_maxmsg*->mq_msgsize is below the limit and reserve the memory,
without further checks at send/receive time.

--
Manfred

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.045 / U:0.104 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site