]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
regmap: regcache-rbtree: Fix present bitmap resize
authorLars-Peter Clausen <lars@metafoo.de>
Sat, 7 Mar 2015 16:10:01 +0000 (17:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Apr 2015 12:03:49 +0000 (14:03 +0200)
commit42785aa288a55a7e2ec5a5c5e4ec87ee9c149336
tree25bb9375d2e3a1d230c7152ac1455d54cf24cee4
parent0e1e3b03a3edcc2fd5a56fbbbc03d6eec07146c9
regmap: regcache-rbtree: Fix present bitmap resize

commit 328f494d95aac8bd4896aea2328bc281053bcb71 upstream.

When inserting a new register into a block at the lower end the present
bitmap is currently shifted into the wrong direction. The effect of this is
that the bitmap becomes corrupted and registers which are present might be
reported as not present and vice versa.

Fix this by shifting left rather than right.

Fixes: 472fdec7380c("regmap: rbtree: Reduce number of nodes, take 2")
Reported-by: Daniel Baluta <daniel.baluta@gmail.com>
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/regmap/regcache-rbtree.c