]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
lib: bitmap: add missing mask in bitmap_shift_right
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 6 Aug 2014 23:10:20 +0000 (16:10 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 7 Aug 2014 01:01:27 +0000 (18:01 -0700)
commitc5341ec8904ebff50f365a2626da6ab525d63b9e
tree0acb8e7d30405e97097d226a8f4d558470e408fe
parent2ac521d3325a24f01c1f1e86c74537b831d282c5
lib: bitmap: add missing mask in bitmap_shift_right

There is no guarantee that *src does not contain garbage bits outside
the lower nbits, so we need to mask it before the shift-and-assign.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
include/linux/bitmap.h