[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <539c47359b37a5b6b9177da823be45d6@dl.linutronix.de>
Date: Wed, 19 Dec 2018 14:29:10 +0100
From: Thomas Gleixner <tglx@...utronix.de>
To: Peter Zijlstra <peterz@...radead.org>
Cc: LKML <linux-kernel@...r.kernel.org>,
Stefan Liebler <stli@...ux.ibm.com>,
Heiko Carstens <heiko.carstens@...ibm.com>,
Darren Hart <dvhart@...radead.org>,
Ingo Molnar <mingo@...nel.org>
Subject: Re: [patch] futex: Cure exit race
On 2018-12-18 10:31, Thomas Gleixner wrote:
> On Wed, 12 Dec 2018, Peter Zijlstra wrote:
>> On Mon, Dec 10, 2018 at 06:43:51PM +0100, Thomas Gleixner wrote:
>> @@ -806,6 +806,8 @@ void __noreturn do_exit(long code)
>> * task into the wait for ever nirwana as well.
>> */
>> tsk->flags |= PF_EXITPIDONE;
>> + smp_mb();
>> + wake_up_bit(&tsk->flags, 3 /* PF_EXITPIDONE */);
>
> Using ilog2(PF_EXITPIDONE) spares that horrible inline comment and
> more
> importantly selects the right bit. 0x04 is bit 2 ....
Plus wake_up_bit() and wait_on_bit() want an unsigned long, but
tsk->flags is
unsigned int....
Moar staring....
Powered by blists - more mailing lists