Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=21778867b1c8e0feb567addb6dc0a7e2ca6ecdec Commit: 21778867b1c8e0feb567addb6dc0a7e2ca6ecdec Parent: d3a7b6df4951170079252402fd0c2dc70cb0ca2a Author: Ingo Molnar <[EMAIL PROTECTED]> AuthorDate: Fri Mar 16 13:38:31 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Fri Mar 16 19:25:06 2007 -0700
[PATCH] futex: PI state locking fix Testing of -rt by IBM uncovered a locking bug in wake_futex_pi(): the PI state needs to be locked before we access it. Signed-off-by: Ingo Molnar <[EMAIL PROTECTED]> Acked-by: Thomas Gleixner <[EMAIL PROTECTED]> Cc: Chuck Ebbert <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- kernel/futex.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/kernel/futex.c b/kernel/futex.c index e749e7d..5a270b5 100644 --- a/kernel/futex.c +++ b/kernel/futex.c @@ -565,6 +565,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) if (!pi_state) return -EINVAL; + spin_lock(&pi_state->pi_mutex.wait_lock); new_owner = rt_mutex_next_owner(&pi_state->pi_mutex); /* @@ -604,6 +605,7 @@ static int wake_futex_pi(u32 __user *uaddr, u32 uval, struct futex_q *this) pi_state->owner = new_owner; spin_unlock_irq(&new_owner->pi_lock); + spin_unlock(&pi_state->pi_mutex.wait_lock); rt_mutex_unlock(&pi_state->pi_mutex); return 0; - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html