projects
/
linux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f033c26
)
regmap: Fix double unlock in the maple cache
author
Mark Brown
<broonie@kernel.org>
Mon, 3 Apr 2023 20:02:39 +0000
(21:02 +0100)
committer
Mark Brown
<broonie@kernel.org>
Tue, 4 Apr 2023 11:46:46 +0000
(12:46 +0100)
Doing the dance to drop the maple tree's internal spinlock means we need
multiple exit paths in our error handling.
Reported-by: Liam R. Howlett <Liam.Howlett@Oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Link:
https://lore.kernel.org/r/20230403-regmap-maple-unlock-v1-1-89998991b16c@kernel.org
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/base/regmap/regcache-maple.c
patch
|
blob
|
history
diff --git
a/drivers/base/regmap/regcache-maple.c
b/drivers/base/regmap/regcache-maple.c
index 497cc708d277b4e1271e5f34ed596e1dbe667c0a..20fb7228fc6bb902544ad59a19c206a268d3a798 100644
(file)
--- a/
drivers/base/regmap/regcache-maple.c
+++ b/
drivers/base/regmap/regcache-maple.c
@@
-137,7
+137,7
@@
static int regcache_maple_drop(struct regmap *map, unsigned int min,
GFP_KERNEL);
if (!lower) {
ret = -ENOMEM;
- goto out;
+ goto out
_unlocked
;
}
}
@@
-151,7
+151,7
@@
static int regcache_maple_drop(struct regmap *map, unsigned int min,
GFP_KERNEL);
if (!upper) {
ret = -ENOMEM;
- goto out;
+ goto out
_unlocked
;
}
}
@@
-179,6
+179,7
@@
static int regcache_maple_drop(struct regmap *map, unsigned int min,
out:
mas_unlock(&mas);
+out_unlocked:
kfree(lower);
kfree(upper);