1. 20 May, 2009 4 commits
    • Thomas Gleixner's avatar
      futex: fix restart in wait_requeue_pi · 2070887f
      Thomas Gleixner authored
      If the waiter has been requeued to the outer PI futex and is
      interrupted by a signal and the thread handles the signal then
      ERESTART_RESTARTBLOCK is changed to EINTR and the restart block is
      discarded. That way we return an unexcpected EINTR to user space
      instead of ending up in futex_lock_pi_restart.
      
      But we do not need to restart the syscall because we know that the
      condition has changed since we have been requeued. If we would simply
      restart the syscall then we would drop out via the comparison of the
      user space value with EWOULDBLOCK.
      
      The user space side needs to handle EWOULDBLOCK anyway as the
      enqueueing on the inner futex can race with a requeue/wake. So we can
      simply return EWOULDBLOCK to user space which also signals that we did
      not take the outer futex and let user space handle it in the same way
      it has to handle the requeue/wake race.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      2070887f
    • Thomas Gleixner's avatar
      futex: fix restart for early wakeup in futex_wait_requeue_pi() · 1c840c14
      Thomas Gleixner authored
      The futex_wait_requeue_pi op should restart unconditionally like
      futex_lock_pi. The user of that function e.g. pthread_cond_wait can
      not be interrupted so we do not care about the SA_RESTART flag of the
      signal. Clean up the FIXMEs.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      1c840c14
    • Thomas Gleixner's avatar
      futex: cleanup error exit · c8b15a70
      Thomas Gleixner authored
      Reuse the put_key_ref(key2) call in the exit path.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      c8b15a70
    • Thomas Gleixner's avatar
      Merge branch 'core/urgent' into core/futexes · 521c1808
      Thomas Gleixner authored
      Merge reason: this branch was on an pre -rc1 base, merge it up to -rc6+
                    to get the latest upstream fixes.
      
      Conflicts:
      	kernel/futex.c
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      521c1808
  2. 19 May, 2009 5 commits
  3. 18 May, 2009 15 commits
  4. 17 May, 2009 7 commits
  5. 16 May, 2009 9 commits