lkml.org 
[lkml]   [2016]   [Feb]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH -next] gpio: Use kzalloc() to allocate struct gpio_device to fix crash
From
On Tue, Feb 16, 2016 at 11:22 AM, Geert Uytterhoeven
<geert+renesas@glider.be> wrote:

> gpiochip_add_data() allocates the struct gpio_device using kmalloc(),
> which doesn't zero the returned memory.
>
> Hence when calling dev_set_name(), it may try to free a bogus old name,
> causing a crash:

Ooops got two patches to this independently and applied the other one,
I tagged your name onto the Reported-by now. Thanks!

Yours,
Linus Walleij

\
 
 \ /
  Last update: 2016-02-18 21:01    [W:0.475 / U:0.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site