aha/drivers/regulator
Paul Walmsley 53032dafc6 regulator core: fix double-free in regulator_register() error path
During regulator registration, any error after device_register() will
cause a double-free on the struct regulator_dev 'rdev'.  The bug is in
drivers/regulator/core.c:regulator_register():

...
scrub:
	device_unregister(&rdev->dev);
clean:
	kfree(rdev);                           <---
	rdev = ERR_PTR(ret);
	goto out;
...

device_unregister() calls regulator_dev_release() which frees rdev.  The
subsequent kfree corrupts memory and causes some OMAP3 systems to oops on
boot in regulator_get().

Applies against 2.6.30-rc3.

Signed-off-by: Paul Walmsley <paul@pwsan.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2009-04-28 18:58:07 +01:00
..
bq24022.c regulator: Allow init data to be supplied for bq24022 2009-03-31 09:56:21 +01:00
core.c regulator core: fix double-free in regulator_register() error path 2009-04-28 18:58:07 +01:00
da903x.c regulator: Pass regulator init data as explict argument when registering 2009-03-31 09:56:21 +01:00
fixed.c regulator: Allow init_data to be passed to fixed voltage regulators 2009-03-31 09:56:21 +01:00
Kconfig regulator: twl4030 regulators 2009-03-31 09:56:25 +01:00
Makefile regulator: twl4030 regulators 2009-03-31 09:56:25 +01:00
pcf50633-regulator.c regulator: Pass regulator init data as explict argument when registering 2009-03-31 09:56:21 +01:00
twl4030-regulator.c regulator: twl4030 VAUX3 supports 3.0V 2009-03-31 11:29:54 +01:00
virtual.c regulator: Mark attributes table for virtual regulator static 2009-03-31 09:56:22 +01:00
wm8350-regulator.c regulator: Implement list_voltage for WM835x LDOs and DCDCs 2009-03-31 09:56:27 +01:00
wm8400-regulator.c regulator: Implement list_voltage() for WM8400 DCDCs and LDOs 2009-03-31 09:56:26 +01:00