Skip to content

Commit

Permalink
Fix the x86_64 implementation of call_rwsem_wait()
Browse files Browse the repository at this point in the history
The x86_64 call_rwsem_wait() treats the active state counter part of the
R/W semaphore state as being 16-bit when it's actually 32-bit (it's half
of the 64-bit state).  It should do "decl %edx" not "decw %dx".

Signed-off-by: David Howells <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
dhowells authored and torvalds committed May 4, 2010
1 parent c81406d commit a66f637
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/x86/lib/rwsem_64.S
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ ENTRY(call_rwsem_down_write_failed)
ENDPROC(call_rwsem_down_write_failed)

ENTRY(call_rwsem_wake)
decw %dx /* do nothing if still outstanding active readers */
decl %edx /* do nothing if still outstanding active readers */
jnz 1f
save_common_regs
movq %rax,%rdi
Expand Down

0 comments on commit a66f637

Please sign in to comment.