]> git.baikalelectronics.ru Git - kernel.git/commit
powerpc/fadump: cleanup crash memory ranges support
authorHari Bathini <hbathini@linux.ibm.com>
Fri, 17 Aug 2018 20:40:56 +0000 (02:10 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Mon, 20 Aug 2018 10:19:54 +0000 (20:19 +1000)
commit3314036259503c025b27cb715c2c9fc8babeb3ab
treef1340e6e8d50f56ae3f75582932afab386160a18
parent1a0eaeea51c28cbbd396339bc792283df4a03753
powerpc/fadump: cleanup crash memory ranges support

Commit 8e7ff5c7a04b ("powerpc/fadump: handle crash memory ranges array
index overflow") changed crash memory ranges to a dynamic array that
is reallocated on-demand with krealloc(). The relevant header for this
call was not included. The kernel compiles though. But be cautious and
add the header anyway.

Also, memory allocation logic in fadump_add_crash_memory() takes care
of memory allocation for crash memory ranges in all scenarios. Drop
unnecessary memory allocation in fadump_setup_crash_memory_ranges().

Fixes: 8e7ff5c7a04b ("powerpc/fadump: handle crash memory ranges array index overflow")
Cc: Mahesh Salgaonkar <mahesh@linux.vnet.ibm.com>
Signed-off-by: Hari Bathini <hbathini@linux.ibm.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/fadump.c