[lkml]   [2012]   [Mar]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [REGRESSION][PATCH] mqueue: Ignore the validity of abs_timeout parameter when message can be performed immediately
On Wed, Mar 14, 2012 at 5:28 PM, Thomas Gleixner <> wrote:
> Aside of my previous ranting about the insanity of that, the following
> is actually open for interpretation:
>  "The validity of the abstime parameter need not be checked if a
>  message can be removed from the message queue immediately."
> It's not necessary to check the validity of the abstime parameter, but
> the spec does not forbid it either.

Yeah, I have to agree with your reading.

I think that checking the validity is the sane thing to do, especially
if it just "falls out" of how the code is written.

At the same time, I can also imagine code that doesn't even look at
the timeout parameter unless it is about to go to sleep, so I can
understand the POSIX wording too: you don't *have* to check the
validity if it's irrelevant, and not checking it is the natural thing
for the code.

But it certainly doesn't seem to disallow the current code either.

So I do not think that the POSIX wording should be taken to mean that
"you mustn't check the validity". It's a "whatever", not a "must do

With the current code, checking the validity of the timeout falls out
from what we do. I don't think we need to work around that, based on
the POSIX wording. And if there are no applications that actually
broke, I don't think we should care.

Is there some other standard that says that you *have* to let crazy
invalid values go?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2012-03-15 04:51    [W:0.054 / U:0.412 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site