* [PATCH] regulator MAX8998/LP3974 Bufgix: accessing array out of bound.
@ 2010-12-23 8:44 MyungJoo Ham
2010-12-23 11:57 ` Mark Brown
0 siblings, 1 reply; 2+ messages in thread
From: MyungJoo Ham @ 2010-12-23 8:44 UTC (permalink / raw)
To: linux-kernel; +Cc: Liam Girdwood, Mark Brown, kyungmin.park, myungjoo.ham
The previous driver may access ldo_voltage_map[] out of its bound at
probe function at line 790 (drivers/regulator/max8998.c). This patch
allocates an entry for every regulator in order to avoid accessing
out-of-bounds.
Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
---
drivers/regulator/max8998.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/drivers/regulator/max8998.c b/drivers/regulator/max8998.c
index 6413e80..ed5253c 100644
--- a/drivers/regulator/max8998.c
+++ b/drivers/regulator/max8998.c
@@ -110,6 +110,11 @@ static const struct voltage_map_desc *ldo_voltage_map[] = {
&buck12_voltage_map_desc, /* BUCK2 */
&buck3_voltage_map_desc, /* BUCK3 */
&buck4_voltage_map_desc, /* BUCK4 */
+ NULL, /* EN32KHZ_AP */
+ NULL, /* EN32KHZ_CP */
+ NULL, /* ENVICHG */
+ NULL, /* ESAFEOUT1 */
+ NULL, /* ESAFEOUT2 */
};
static inline int max8998_get_ldo(struct regulator_dev *rdev)
--
1.7.1
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] regulator MAX8998/LP3974 Bufgix: accessing array out of bound.
2010-12-23 8:44 [PATCH] regulator MAX8998/LP3974 Bufgix: accessing array out of bound MyungJoo Ham
@ 2010-12-23 11:57 ` Mark Brown
0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2010-12-23 11:57 UTC (permalink / raw)
To: MyungJoo Ham; +Cc: linux-kernel, Liam Girdwood, kyungmin.park, myungjoo.ham
On Thu, Dec 23, 2010 at 05:44:28PM +0900, MyungJoo Ham wrote:
> The previous driver may access ldo_voltage_map[] out of its bound at
> probe function at line 790 (drivers/regulator/max8998.c). This patch
> allocates an entry for every regulator in order to avoid accessing
> out-of-bounds.
>
> Signed-off-by: MyungJoo Ham <myungjoo.ham@samsung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
If reposting a previously acked patch then please add the ack to the
patch - makes life easier when reviewing. If you change the patch then
it needs rechecking but otherwise just keep the acks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-12-23 11:57 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-12-23 8:44 [PATCH] regulator MAX8998/LP3974 Bufgix: accessing array out of bound MyungJoo Ham
2010-12-23 11:57 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox