Re: [PATCH 1/1] futex: do not fail on invalid op

From: Linus Torvalds
Date: Mon Oct 23 2017 - 06:48:53 EST


On Mon, Oct 23, 2017 at 5:31 AM, Jiri Slaby <jslaby@xxxxxxx> wrote:
>
> So let us soften the failure to print only a (ratelimited) message and
> return 0 silently in these cases until userspace keeps up.

No, please make it do that ratelimited warning, but then continue as
if things were ok - trying to approximate what the code used to do.

Don't make it return success without actually doing anything.

So just make it do

oparg = 1 << (oparg & 31);

or something. That's what that sequence would have done at least on 32-bit x86.

Maybe that was what it happened to expect by random luck. And maybe it
didn't matter. But don't just say "it worked" without doing anything.

Linus