From mboxrd@z Thu Jan 1 00:00:00 1970 From: johan@kernel.org (Johan Hovold) Date: Wed, 3 Dec 2014 11:35:32 +0100 Subject: [PATCH] leds: netxbig: fix oops at probe time In-Reply-To: <1417534330-13154-1-git-send-email-simon.guinot@sequanux.org> References: <1417534330-13154-1-git-send-email-simon.guinot@sequanux.org> Message-ID: <20141203103532.GD9664@localhost> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Tue, Dec 02, 2014 at 04:32:10PM +0100, Simon Guinot wrote: > 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 > [...] > [] (netxbig_led_probe) from [] (platform_drv_probe+0x4c/0x9c) > [] (platform_drv_probe) from [] (driver_probe_device+0x98/0x25c) > [] (driver_probe_device) from [] (__driver_attach+0x8c/0x90) > [] (__driver_attach) from [] (bus_for_each_dev+0x68/0x94) > [] (bus_for_each_dev) from [] (bus_add_driver+0x124/0x1dc) > [] (bus_add_driver) from [] (driver_register+0x78/0xf8) > [] (driver_register) from [] (do_one_initcall+0x80/0x1cc) > [] (do_one_initcall) from [] (kernel_init_freeable+0xe4/0x1b4) > [] (kernel_init_freeable) from [] (kernel_init+0xc/0xec) > [] (kernel_init) from [] (ret_from_fork+0x14/0x24) > [...] > > This bug was introduced by commit 588a6a99286ae30afb1339d8bc2163517b1b7dd1 > ("leds: netxbig: fix attribute-creation race"). Ouch. > Signed-off-by: Simon Guinot > Cc: # 3.17+ Acked-by: Johan Hovold Thanks, Johan