[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101222132936.GE26306@opensource.wolfsonmicro.com>
Date: Wed, 22 Dec 2010 13:29:37 +0000
From: Mark Brown <broonie@...nsource.wolfsonmicro.com>
To: MyungJoo Ham <myungjoo.ham@...sung.com>
Cc: linux-kernel@...r.kernel.org, Samuel Ortiz <sameo@...ux.intel.com>,
Liam Girdwood <lrg@...mlogic.co.uk>,
Alessandro Zummo <a.zummo@...ertech.it>,
Kyungmin Park <kyungmin.park@...sung.com>,
Joonyoung Shim <jy0922.shim@...sung.com>,
Lukasz Majewski <l.majewski@...sung.com>,
myungjoo.ham@...il.com
Subject: Re: [PATCH v2 4/6] MFD MAX8998/LP3974 Bufgix: accessing array out
of bound.
On Wed, Dec 22, 2010 at 03:23:09PM +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@...sung.com>
> Signed-off-by: Kyungmin Park <kyungmin.park@...sung.com>
Acked-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>
for the fix but
> &buck4_voltage_map_desc, /* BUCK4 */
> + NULL, /* EN32KHZ_AP */
> + NULL, /* EN32KHZ_CP */
> + NULL, /* ENVICHG */
> + NULL, /* ESAFEOUT1 */
> + NULL, /* ESAFEOUT2 */
it might be nicer to do this with a constant for the array size, or by
having the users check for ARRAY_SIZE().
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists