Re: PI BUG with -rt13
From: david singleton (dsingleton_at_mvista.com)
Date: 11/18/05
- Previous message: Stephane Eranian: "2.6.15-rc1-git6 perfmon new code base package available"
- In reply to: Ingo Molnar: "Re: PI BUG with -rt13"
- Next in thread: Ingo Molnar: "Re: PI BUG with -rt13"
- Maybe reply: Dinakar Guniguntala: "Fw: Re: PI BUG with -rt13"
- Reply: Ingo Molnar: "Re: PI BUG with -rt13"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 18 Nov 2005 09:05:25 -0800 To: Ingo Molnar <mingo@elte.hu>
On Nov 18, 2005, at 5:27 AM, Ingo Molnar wrote:
>
> * Dinakar Guniguntala <dino@in.ibm.com> wrote:
>
>> Ingo, Thanks for providing the fix. However I still hit the same bug
>> even with your changes
>
> even with my patch the robust-futex code is still quite broken. E.g. in
> down_futex(), it accesses rt-mutex internals without any locking (!):
>
> if (rt_mutex_free(lock)) {
> __down_mutex(lock __EIP__);
> rt_mutex_set_owner(lock, owner_task->thread_info);
> }
>
> both rt_mutex_free() and rt_mutex_set_owner() must be called with the
> proper locking. David?
Yes, the lock needs to be protected by the robust semaphore.
The locking order is:
mmap_sem to protect the vma that holds the pthread_mutex
robust_sem to protect the futex_mutex chain.
futex_mutex - the rt_mutex associated with the
pthread_mutex.
This section of code performs the locking of the first waiter
on the pthread_mutex, which was locked by another thread in the
fast path in userspace. The fast path locking does not enter
the
kernel.
The first waiter locks the futex_mutex and then changes the
owner to the 'owning' thread. The waiter then calls
down_interruptible
to block on the futex_mutex.
I'll provide a patch to protect this piece of code.
David
>
> Ingo
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
- Previous message: Stephane Eranian: "2.6.15-rc1-git6 perfmon new code base package available"
- In reply to: Ingo Molnar: "Re: PI BUG with -rt13"
- Next in thread: Ingo Molnar: "Re: PI BUG with -rt13"
- Maybe reply: Dinakar Guniguntala: "Fw: Re: PI BUG with -rt13"
- Reply: Ingo Molnar: "Re: PI BUG with -rt13"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|