[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4CD872A6.1020903@linux.intel.com>
Date: Mon, 08 Nov 2010 13:59:02 -0800
From: Darren Hart <dvhart@...ux.intel.com>
To: Thomas Gleixner <tglx@...utronix.de>
CC: Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Peter Zijlstra <peterz@...radead.org>,
Ingo Molnar <mingo@...e.hu>,
Eric Dumazet <eric.dumazet@...il.com>,
John Kacur <jkacur@...hat.com>
Subject: Re: [PATCH V3] futex: add futex_q static initializer
On 11/08/2010 01:48 PM, Thomas Gleixner wrote:
> On Mon, 8 Nov 2010, Darren Hart wrote:
>> /*
>> * Hash buckets are shared by all the futex_keys that hash to the same
>> * location. Each key may have multiple futex_q structures, one for each task
>> @@ -1751,7 +1757,6 @@ static int futex_wait_setup(u32 __user *uaddr, u32 val, unsigned int flags,
>> * rare, but normal.
>> */
>> retry:
>> - q->key = FUTEX_KEY_INIT;
>
> You sure about that one in the retry path ?
>
>> @@ -1906,11 +1907,7 @@ static int futex_lock_pi(u32 __user *uaddr, unsigned int flags, int detect,
>> hrtimer_set_expires(&to->timer, *time);
>> }
>>
>> - q.pi_state = NULL;
>> - q.rt_waiter = NULL;
>> - q.requeue_pi_key = NULL;
>> retry:
>> - q.key = FUTEX_KEY_INIT;
>
> Ditto
Yes, these are fine. get_futex_key (called immediately after retry: in
both cases) will set the mm or inode or error out. On error we return
immediately. No need to zero both.ptr.
Thanks,
--
Darren Hart
Embedded Linux Kernel
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists