android_kernel_google_msm/drivers/regulator
Ashay Jaiswal 8f108b362b regulator: core: fix race condition in regulator_put()
commit 83b0302d347a49f951e904184afe57ac3723476e upstream.

The regulator framework maintains a list of consumer regulators
for a regulator device and protects it from concurrent access using
the regulator device's mutex lock.

In the case of regulator_put() the consumer is removed and regulator
device's parameters are updated without holding the regulator device's
mutex. This would lead to a race condition between the regulator_put()
and any function which traverses the consumer list or modifies regulator
device's parameters.
Fix this race condition by holding the regulator device's mutex in case
of regulator_put.

Signed-off-by: Ashay Jaiswal <ashayj@codeaurora.org>
Signed-off-by: Mark Brown <broonie@kernel.org>
[lizf: Backported to 3.4:
 - adjust context
 - no need to change the comment]
Signed-off-by: Zefan Li <lizefan@huawei.com>
2015-04-14 17:33:55 +08:00
..
88pm8607.c
aat2870-regulator.c
ab3100.c
ab8500.c
ad5398.c
anatop-regulator.c
core.c regulator: core: fix race condition in regulator_put() 2015-04-14 17:33:55 +08:00
da903x.c
da9052-regulator.c
db8500-prcmu.c
dbx500-prcmu.c
dbx500-prcmu.h
dummy.c
dummy.h
fixed-helper.c
fixed.c
gpio-regulator.c
isl6271a-regulator.c
Kconfig
lp3971.c
lp3972.c
Makefile
max1586.c
max8649.c
max8660.c
max8925-regulator.c
max8952.c
max8997.c
max8998.c
mc13xxx-regulator-core.c
mc13xxx.h
mc13783-regulator.c
mc13892-regulator.c
of_regulator.c
pcap-regulator.c
pcf50633-regulator.c
s5m8767.c
tps6105x-regulator.c
tps6507x-regulator.c
tps6524x-regulator.c
tps6586x-regulator.c
tps62360-regulator.c
tps65023-regulator.c
tps65217-regulator.c
tps65910-regulator.c
tps65912-regulator.c
twl-regulator.c
userspace-consumer.c
virtual.c
wm831x-dcdc.c
wm831x-isink.c
wm831x-ldo.c
wm8350-regulator.c
wm8400-regulator.c
wm8994-regulator.c