[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+55aFygRpuCZ0K0_hon7t3H+qa3WKb3--VXooN8p14S6or2tw@mail.gmail.com>
Date: Wed, 14 Mar 2012 20:48:36 -0700
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Thomas Gleixner <tglx@...utronix.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Akira Takeuchi <takeuchi.akr@...panasonic.com>,
linux-kernel@...r.kernel.org, Carsten Emde <C.Emde@...dl.org>,
Manfred Spraul <manfred@...orfullife.com>
Subject: Re: [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 <tglx@...utronix.de> 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
X".
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?
Linus
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists