Re: PI BUG with -rt13

From: david singleton (dsingleton_at_mvista.com)
Date: 11/18/05

  • Next message: Tim Schmielau: "Re: [RFC: 2.6 patch] remove drivers/net/eepro100.c"
    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/


  • Next message: Tim Schmielau: "Re: [RFC: 2.6 patch] remove drivers/net/eepro100.c"

    Relevant Pages

    • Re: [PATCH 07/10] [PATCH] check connect(2) status for IPv6 UDP socket
      ... I recreate a patch ... "David S. Miller" wrote: ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • latest mtd changes broke collie
      ... reverts the bad patch. ... * Copyright 2000,2001 David A. Schleef ... 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/ ...
      (Linux-Kernel)
    • Re: ALSA update broke Sparc
      ... pointers, he uses it. ... > David, could you try the attached patch? ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [1/7] Xen VMM #3: add ptep_establish_new to make va available
      ... >> I'd appreciate a pointer to the patch. ... I was hoping that David would reply with one:) It wasn't ported ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)
    • Re: [RFC 1/3] non-resident page tracking
      ... On Mon, 8 Aug 2005, David S. Miller wrote: ... > patch, and is not mentioned in the changelog. ... send the line "unsubscribe linux-kernel" in ...
      (Linux-Kernel)