]> asedeno.scripts.mit.edu Git - linux.git/commit
pstore/ram: Replace dummy_data heap memory with stack memory
authorYue Hu <huyue2@yulong.com>
Mon, 21 Jan 2019 10:20:41 +0000 (18:20 +0800)
committerKees Cook <keescook@chromium.org>
Tue, 22 Jan 2019 03:32:17 +0000 (19:32 -0800)
commit182ca6e0ae23550cf98d05daeab8dcb7fdc0a928
treee894592e210eea285e00ecfba2429bbe147470cd
parent49a57857aeea06ca831043acbb0fa5e0f50602fd
pstore/ram: Replace dummy_data heap memory with stack memory

In ramoops_register_dummy() dummy_data is allocated via kzalloc()
then it will always occupy the heap space after register platform
device via platform_device_register_data(), but it will not be
used any more. So let's free it for system usage, replace it with
stack memory is better due to small size.

Signed-off-by: Yue Hu <huyue2@yulong.com>
[kees: add required memset and adjust sizeof() argument]
Signed-off-by: Kees Cook <keescook@chromium.org>
fs/pstore/ram.c