Re: futex question

From: Thomas Gleixner
Date: Sun Oct 04 2009 - 04:46:13 EST


On Fri, 2 Oct 2009, Darren Hart wrote:
> Anirban Sinha wrote:
> > > Should we not just clear the pointer (and
> > > > it's compat version) within do_execve()?
> >
> >
> > In our private repository, applying the following patch resolved the
> > issues I mentioned. I no longer see messages like this:
> >
> > [futex] ("ifconfig")(pid=2509) exit_robust_list:unable to fetch robust
> > entry. uaddr=0x000000002abbc4f0
> >
> > from my instrumented kernel within exit_robust_list(). My
> > instrumentation looked something like this:
>
> >
> > if (fetch_robust_entry(...)) {
> > printk(...);
> > return;
> > }
> >
> > Just tossing the patch in the community in case someone is interested
>
>
> Thanks for sending the patch. I'm looking into it now. Couple questions:
>
> 1) What caused you to instrument this path in the first place? Were you
> seeing some unexpected behavior?
>
> 2) I wonder why we would need to clear the robust list, but I don't see other
> things like pi_blocked_on, etc. in execve being cleared. I'm looking into
> this now (perhaps we don't do the same cleanup, need to check).... have to get
> on the plane...

Hmm, just setting the robust list pointer to NULL fixes the problem at
hand, but I wonder whether we need to call exit_robust_list() as
well.

Vs. pi_blocked_on: If that's != NULL then you are not executing that
code path because you hang in the scheduler waiting for the lock.

The interesting question is whether we need to call
exit_pi_state_list() to fix up held locks.

Thanks,

tglx

--
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/