Re: [PATCH 0/1] futex: check PF_KTHREAD rather than !p->mm to filter out kthreads

From: Darren Hart
Date: Mon Feb 09 2015 - 15:38:46 EST


Hi Oleg, Peter,

Wow! When it rains it pours.

I'm paging this all in, but unfortunately, like both of you, I'm
pretty new to the robust futexes side of this problem.

I will prepare the test that Peter suggested so we have something to
test with now as well as run for regressions over time.

On Fri, Feb 6, 2015 at 9:04 AM, Oleg Nesterov <oleg@xxxxxxxxxx> wrote:
> Peter, I am spamming you again and again, but I didn't even start the
> patches. It turns out I can do nothing until devconf.cz finishes next
> week.
>
> On 02/06, Peter Zijlstra wrote:
>>
>> On Thu, Feb 05, 2015 at 07:10:14PM +0100, Oleg Nesterov wrote:
>>
>> > So I think that in this case we either need to recheck that *uaddr is still the
>> > same (and turn -ESRCH into -EAGAIN otherwise), or change handle_futex_death() to
>> > serialize with X so that it can proceed and attach pi_state.
>> >
>> > No?
>>
>> I _think_ you're right, doing -ESRCH is wrong without first looking to
>> see if uval changed and gained an FUTEX_OWNER_DIED.
>

Hrm, if we cleared the TID mask, and the pi chain is empty, can we not
clear the waiters? I'm sure there's at least one corner case that
complicates this further... I'll think on this more and get back to
you.

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