Re: Q: sys_futex() && timespec_valid()

From: Oleg Nesterov
Date: Mon Jun 28 2010 - 10:01:16 EST


On 06/25, Ulrich Drepper wrote:
>
> ----- "Darren Hart" <dvhltc@xxxxxxxxxx> wrote:
> > Unless there is some good reason to object to breaking the API that I
> > am missing, I don't mind changing it to -ETIMEDOUT (although -EINVAL
> > seems more intuitive to me).
>
> It's only not intuitive because Oleg misrepresented or at least didn't
> describe the issue.
> ...
> It pure and simply
> a bug fix.

Because personally I disagree that sys_futex()->timespec_valid() is buggy.

I repeated this many times during the previous discussion. I didn't even
try to judge if it is really right or not, because my opinion doesn't matter
at all here.

But it is unfair (imho) to state this code is buggy. The code is correct
even if it does not match your expectations, it works as expected/designed.
And, sys_futex() does this since 2006 iirc.


Honestly, it looks a bit strange to me that you blame the correct code,
and at the same time you ignore the test-case which hangs because the
kernel returns -EFAULT saying that this is the caller's problem.

Oleg.

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