summaryrefslogtreecommitdiffstats
path: root/arch/mips
diff options
context:
space:
mode:
authorJosh Cartwright <joshc@ni.com>2016-02-17 16:44:15 -0600
committerLinus Walleij <linus.walleij@linaro.org>2016-02-18 20:45:25 +0100
commit969f07b445d1c30479f53ce6818e1263043b999a (patch)
tree0093989a761093fb02a7fef7b3e6b9e131186c70 /arch/mips
parentaaf2b3afb93102411412f9dad8d84b13fc7f7edb (diff)
downloadop-kernel-dev-969f07b445d1c30479f53ce6818e1263043b999a.zip
op-kernel-dev-969f07b445d1c30479f53ce6818e1263043b999a.tar.gz
gpio: use kzalloc to allocate gpio_device
The use of kmalloc() to allocate the gpio_device leaves the contained struct device object in an unknown state. Calling dev_set_name() on a struct device of unknown state can trigger the free() of an invalid pointer, as seen in the following backtrace (collected by Tony Lindgren): kfree kobject_set_name_vargs dev_set_name gpiochip_add_data omap_gpio_probe platform_drv_probe ... Reported-by: Geert Uytterhoeven <geert+renesas@glider.be> Reported-by: Michael Welling <mwelling@ieee.org> Reported-by: Tony Lindgren <tony@atomide.com> Tested-by: Michael Welling <mwelling@ieee.org> Tested-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Josh Cartwright <joshc@ni.com> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/mips')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud