diff options
author | Martin Schwidefsky <schwidefsky@de.ibm.com> | 2005-07-27 22:44:58 +0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-07-28 03:26:04 +0400 |
commit | afff7e2b3b13dbd26a2b9991d3d571df111d92e8 (patch) | |
tree | 51142ff8f5160bcd317120ffba604653c9e34455 /include/asm-s390/atomic.h | |
parent | 951f22d5b1f0eaae35dafc669e3774a0c2084d10 (diff) | |
download | linux-afff7e2b3b13dbd26a2b9991d3d571df111d92e8.tar.xz |
[PATCH] s390: find_next_{zero}_bit fixes
The find_next_{zero}_bit primitives on s390* should never return a bit number
bigger then the bit field size. In the case of a bitfield that doesn't end on
a word boundary, an offset that makes the search start at the last word of the
bit field and the last word doesn't contain any zero/one bits the search is
continued with a call to find_first_bit with a negative size. The search
normally ends pretty quickly because the words following the bit field contain
a mix of zeros and ones. But the bit number that is returned in this case is
too big.
To fix this and additional if to check for this case is needed. To make the
code easier to read I removed the assembler parts from the
find_next_{zero}_bit functions, the C-ified code is as good.
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/asm-s390/atomic.h')
0 files changed, 0 insertions, 0 deletions