Re: [RESEND PATCH] futex: fix key reference counter in case of requeue.

From: Matthieu Fertré
Date: Mon Oct 18 2010 - 08:19:34 EST


Le 15/10/2010 14:16, Thomas Gleixner a écrit :
> On Thu, 14 Oct 2010, Louis Rilling wrote:
>
>> From: Matthieu Fertré <matthieu.fertre@xxxxxxxxxxx>
>>
>> This patch ensures that we are referring to the right key when dropping
>> reference for the futex_wait operation.
>>
>> The following scenario explains a typical case where the bug was
>> happening:
>>
>> Process P calls futex_wait() on futex identified by 'key1'. 2 references
>> are taken on this key: one for the struct futex_q itself, and one for the
>> futex_wait operation.
>
> It took a while to understand that explanation. You mean we get one
> ref in get_key_ref() and one in queue_lock(), right ?
>

That's it. Sorry for the unclear explanation.

Regards,

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