linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 2/2] leds-lp5523: Fix riskiness of the page fault
@ 2012-09-12 12:16 Kim, Milo
  2012-09-13  3:56 ` Bryan Wu
  0 siblings, 1 reply; 2+ messages in thread
From: Kim, Milo @ 2012-09-12 12:16 UTC (permalink / raw)
  To: Bryan Wu; +Cc: linux-leds, linux-kernel, Richard Purdie

 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.

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



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH 2/2] leds-lp5523: Fix riskiness of the page fault
  2012-09-12 12:16 [PATCH 2/2] leds-lp5523: Fix riskiness of the page fault Kim, Milo
@ 2012-09-13  3:56 ` Bryan Wu
  0 siblings, 0 replies; 2+ messages in thread
From: Bryan Wu @ 2012-09-13  3:56 UTC (permalink / raw)
  To: Kim, Milo; +Cc: linux-leds, linux-kernel, Richard Purdie

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-09-13  3:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-09-12 12:16 [PATCH 2/2] leds-lp5523: Fix riskiness of the page fault Kim, Milo
2012-09-13  3:56 ` Bryan Wu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).