Re: Help requested: futex(..., FUTEX_WAIT_PRIVATE, ...) returns EPERM

From: Thomas Gleixner
Date: Wed Nov 13 2019 - 16:34:59 EST


On Wed, 13 Nov 2019, Harris, Robert wrote:
> > On 13 Nov 2019, at 09:04, Thomas Gleixner <tglx@xxxxxxxxxxxxx> wrote:
> > On Tue, 12 Nov 2019, Harris, Robert wrote:
> >> Understanding the circumstances under which EPERM can be returned for
> >> FUTEX_WAIT_PRIVATE would be useful but it is not a documented failure
> >> mode. I have spent some time looking through futex.c but have not
> >> found anything yet. I would be grateful for a hint from someone more
> >> knowledgeable.
> >
> > sys_futex(FUTEX_WAIT_PRIVATE) does not return -EPERM. Only the PI variants
> > do that.
>
> In that case I would appreciate a second pair of eyes. The error I see
> (intermittently) is

The code looks innocent enough. As I don't know whether the kernel version
you mentioned is a vanilla 4.19.184 from the stable tree or some patched up
frankenkernel which pretends to have this version number, I can't be sure
that this is an issue in that particular kernel.

In the vanilla 4.19.184 I really cant find how that would return EPERM for
regular futexes.

Thanks,

tglx