Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=d52c2d5a626a2cb1848fa7063b3ab79e2752dac7 Commit: d52c2d5a626a2cb1848fa7063b3ab79e2752dac7 Parent: d0c91ae2bb3df9d7bef279d8f400e0c8ddde0b5e Author: Dave Johnson <[EMAIL PROTECTED]> AuthorDate: Mon Mar 5 20:50:27 2007 -0500 Committer: Ralf Baechle <[EMAIL PROTECTED]> CommitDate: Wed Mar 7 00:07:17 2007 +0000
[MIPS] Fix __raw_read_trylock() to allow multiple readers A deadlock can occur for mixed irq and non-irq rwlock readers if a 2nd reader attempts to take lock by looping around __raw_read_trylock(). Signed-off-by: Dave Johnson <[EMAIL PROTECTED]> Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]> --- include/asm-mips/spinlock.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/asm-mips/spinlock.h b/include/asm-mips/spinlock.h index f1755d2..35e431c 100644 --- a/include/asm-mips/spinlock.h +++ b/include/asm-mips/spinlock.h @@ -287,7 +287,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) " .set noreorder # __raw_read_trylock \n" " li %2, 0 \n" "1: ll %1, %3 \n" - " bnez %1, 2f \n" + " bltz %1, 2f \n" " addu %1, 1 \n" " sc %1, %0 \n" " .set reorder \n" @@ -304,7 +304,7 @@ static inline int __raw_read_trylock(raw_rwlock_t *rw) " .set noreorder # __raw_read_trylock \n" " li %2, 0 \n" "1: ll %1, %3 \n" - " bnez %1, 2f \n" + " bltz %1, 2f \n" " addu %1, 1 \n" " sc %1, %0 \n" " beqz %1, 1b \n" - 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