lkml.org 
[lkml]   [2012]   [Sep]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH 2/2] leds-lp5523: Fix riskiness of the page fault
On Wed, Sep 12, 2012 at 8:16 PM, Kim, Milo <Milo.Kim@ti.com> wrote:
> The last attribute should be terminated as NULL because any member of
> attribute structure is accessed while adding the sysfs file.
> If not, invalid address may cause the page fault problem.
>

Thanks, applied
-Bryan

> Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com>
> ---
> drivers/leds/leds-lp5523.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c
> index 5ebdc92..97994ff 100644
> --- a/drivers/leds/leds-lp5523.c
> +++ b/drivers/leds/leds-lp5523.c
> @@ -759,6 +759,7 @@ static struct attribute *lp5523_attributes[] = {
> &dev_attr_engine2_leds.attr,
> &dev_attr_engine3_load.attr,
> &dev_attr_engine3_leds.attr,
> + NULL,
> };
>
> static const struct attribute_group lp5523_group = {
> --
> 1.7.9.5
>
>
> Best Regards,
> Milo
>
>



--
Bryan Wu <bryan.wu@canonical.com>
Kernel Developer +86.186-168-78255 Mobile
Canonical Ltd. www.canonical.com
Ubuntu - Linux for human beings | www.ubuntu.com


\
 
 \ /
  Last update: 2012-09-13 06:42    [W:0.061 / U:1.612 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site