1. 26 Jan, 2021 2 commits
    • Thomas Gleixner's avatar
      futex: Replace pointless printk in fixup_owner() · 04b79c55
      Thomas Gleixner authored
      If that unexpected case of inconsistent arguments ever happens then the
      futex state is left completely inconsistent and the printk is not really
      helpful. Replace it with a warning and make the state consistent.
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      04b79c55
    • Thomas Gleixner's avatar
      futex: Ensure the correct return value from futex_lock_pi() · 12bb3f7f
      Thomas Gleixner authored
      In case that futex_lock_pi() was aborted by a signal or a timeout and the
      task returned without acquiring the rtmutex, but is the designated owner of
      the futex due to a concurrent futex_unlock_pi() fixup_owner() is invoked to
      establish consistent state. In that case it invokes fixup_pi_state_owner()
      which in turn tries to acquire the rtmutex again. If that succeeds then it
      does not propagate this success to fixup_owner() and futex_lock_pi()
      returns -EINTR or -ETIMEOUT despite having the futex locked.
      
      Return success from fixup_pi_state_owner() in all cases where the current
      task owns the rtmutex and therefore the futex and propagate it correctly
      through fixup_owner(). Fixup the other callsite which does not expect a
      positive return value.
      
      Fixes: c1e2f0ea ("futex: Avoid violating the 10th rule of futex")
      Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
      Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
      Cc: stable@vger.kernel.org
      12bb3f7f
  2. 25 Jan, 2021 7 commits
  3. 24 Jan, 2021 31 commits