leds: netxbig: fix oops at probe time
PATCH 1/1 leds: netxbig: fix oops at probe time
This patch fixes a NULL pointer dereference on led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:
Unable to handle kernel NULL pointer dereference at virtual address 00000008
[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]
This bug was introduced by commit 588a6a99286ae30afb1339d8bc2163517b1b7dd1 ("leds: netxbig: fix attribute-creation race").
--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
drivers/leds/leds-netxbig.c +6 -6
@@ -330,18 +330,18 @@ create_netxbig_led(struct platform_device *pdev, led_dat->sata =0 ; led_dat->cdev.brightness =LED_OFF ; led_dat->cdev.flags |=LED_CORE_SUSPENDRESUME ; -/* -* If available, expose the SATA activity blink capability through -* a "sata" sysfs attribute. -*/ -if (led_dat->mode_val[NETXBIG_LED_SATA ] !=NETXBIG_LED_INVALID_MODE ) - led_dat->cdev.groups = netxbig_led_groups; led_dat->mode_addr = template->mode_addr; led_dat->mode_val = template->mode_val; led_dat->bright_addr = template->bright_addr; led_dat->bright_max = (1 << pdata->gpio_ext->num_data) -1 ; led_dat->timer = pdata->timer; led_dat->num_timer = pdata->num_timer; +/* +* If available, expose the SATA activity blink capability through +* a "sata" sysfs attribute. +*/ +if (led_dat->mode_val[NETXBIG_LED_SATA ] !=NETXBIG_LED_INVALID_MODE ) + led_dat->cdev.groups = netxbig_led_groups;return led_classdev_register (&pdev->dev, &led_dat->cdev); }
Signature · 1 line
2.1.1
PATCH 1/1 leds: netxbig: fix oops at probe time
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]
Quoted 2 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").
Ouch.
Quoted 2 lines
Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+
Thanks,
Johan
PATCH 1/1 leds: netxbig: fix oops at probe time
In reply to Simon GuinotQuoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]
Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Hi Bryan,
Please apply up this patch.
Thanks.
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141211/e7488934/attachment.sig>
PATCH 1/1 leds: netxbig: fix oops at probe time
Quoted 28 lines · Simon Guinot
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 3 lines
Hi Bryan,
Please apply up this patch.
Hi Bryan,
Is there any news about this patch on your side ?
Jason, Andrew, Sebastian,
Maybe this patch can go through the SoC branch ?
Thanks in advance.
Simon
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141222/af388081/attachment.sig>
PATCH 1/1 leds: netxbig: fix oops at probe time
In reply to Simon GuinotQuoted 28 lines · Simon Guinot
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
Quoted 7 lines
Hi Bryan,
Please apply up this patch.
Thanks.
Simon
Sorry for the delay. I will merge it.
-Bryan
PATCH 1/1 leds: netxbig: fix oops at probe time
Quoted 31 lines · Bryan Wu
Quoted 30 lines · Simon Guinot
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Hi Bryan,
Quoted 7 lines
Quoted 5 lines
Please apply up this patch.
Thanks.
Simon
Sorry for the delay. I will merge it.
Hi Bryan
It has already been sent to arm-soc. If you are going to merge it, please ask Olof to drop it.
Andrew
PATCH 1/1 leds: netxbig: fix oops at probe time
Quoted 38 lines · Andrew Lunn
Quoted 37 lines · Bryan Wu
Quoted 35 lines · Simon Guinot
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Hi Bryan,
Please apply up this patch.
Thanks.
Simon
Quoted 8 lines
Quoted 1 line
Sorry for the delay. I will merge it.
Hi Bryan
It has already been sent to arm-soc. If you are going to merge it, please ask Olof to drop it.
Andrew
Olof, could you please drop this from your arm-soc tree. I've merged it to my tree. and will send a fix for Linus soon
Thanks,
-Bryan
PATCH 1/1 leds: netxbig: fix oops at probe time
Quoted 43 lines · Bryan Wu
Quoted 42 lines · Andrew Lunn
Quoted 31 lines · Bryan Wu
Quoted 30 lines · Simon Guinot
Quoted 18 lines · Simon Guinot
This patch fixes a NULL pointer dereference on
led_dat->mode_val. Due to this bug, a kernel oops can be observed at probe time on the LaCie 2Big and 5Big v2 boards:Unable to handle kernel NULL pointer dereference at virtual address 00000008[...]
[<c03f244c>] (netxbig_led_probe) from [<c02c8c6c>] (platform_drv_probe+0x4c/0x9c) [<c02c8c6c>] (platform_drv_probe) from [<c02c72d0>] (driver_probe_device+0x98/0x25c) [<c02c72d0>] (driver_probe_device) from [<c02c7520>] (__driver_attach+0x8c/0x90) [<c02c7520>] (__driver_attach) from [<c02c5c24>] (bus_for_each_dev+0x68/0x94) [<c02c5c24>] (bus_for_each_dev) from [<c02c6408>] (bus_add_driver+0x124/0x1dc) [<c02c6408>] (bus_add_driver) from [<c02c7ac0>] (driver_register+0x78/0xf8) [<c02c7ac0>] (driver_register) from [<c000888c>] (do_one_initcall+0x80/0x1cc) [<c000888c>] (do_one_initcall) from [<c0733618>] (kernel_init_freeable+0xe4/0x1b4) [<c0733618>] (kernel_init_freeable) from [<c058db9c>] (kernel_init+0xc/0xec) [<c058db9c>] (kernel_init) from [<c0009850>] (ret_from_fork+0x14/0x24) [...]Quoted 8 lines
This bug was introduced by commit
588a6a99286ae30afb1339d8bc2163517b1b7dd1("leds: netxbig: fix attribute-creation race").Signed-off-by Simon Guinot <[email protected]>Cc <[email protected]> # 3.17+--- drivers/leds/leds-netxbig.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)Hi Bryan,
Quoted 7 lines
Quoted 5 lines
Please apply up this patch.
Thanks.
Simon
Sorry for the delay. I will merge it.
Hi Bryan
Quoted 7 lines
Quoted 4 lines
It has already been sent to arm-soc. If you are going to merge it, please ask Olof to drop it.
Andrew
Olof, could you please drop this from your arm-soc tree. I've merged it to my tree. and will send a fix for Linus soon
Sigh. Andrew even told you it's already been merged, and _then_ you send up a single patch pull request with _just_ this to Linus after having been completely unresponsive for a month?
Anyway, dropped the last fixes branch from mvebu now.
Btw: Andrew, in the future it's useful to get these kind of requests cc:d to arm at kernel.org, since I don't monitor my inbox the same way I keep an eye on that folder. I didn't notice this until several days later. Not your fault, but it'd help me. :-)
-Olof