[PATCH] powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n

Subsystems: linux for powerpc (32-bit and 64-bit), the rest

STALE3589d

3 messages, 3 authors, 2016-10-05 · open the first message on its own page

[PATCH] powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2016-09-30 00:51:49

The fadump code calls vmcore_cleanup() which only exists if
CONFIG_PROC_VMCORE=y. We don't want to depend on CONFIG_PROC_VMCORE,
because it's user selectable, so just wrap the call in an #ifdef.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/fadump.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index b3a663333d36..8d461303dd13 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1104,7 +1104,9 @@ static ssize_t fadump_release_memory_store(struct kobject *kobj,
 		 * Take away the '/proc/vmcore'. We are releasing the dump
 		 * memory, hence it will not be valid anymore.
 		 */
+#ifdef CONFIG_PROC_VMCORE
 		vmcore_cleanup();
+#endif
 		fadump_invalidate_release_mem();
 
 	} else
-- 
2.7.4

Re: [PATCH] powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n

From: Balbir Singh <bsingharora@gmail.com>
Date: 2016-09-30 10:26:59


On 30/09/16 10:51, Michael Ellerman wrote:
quoted hunk
The fadump code calls vmcore_cleanup() which only exists if
CONFIG_PROC_VMCORE=y. We don't want to depend on CONFIG_PROC_VMCORE,
because it's user selectable, so just wrap the call in an #ifdef.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
---
 arch/powerpc/kernel/fadump.c | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/arch/powerpc/kernel/fadump.c b/arch/powerpc/kernel/fadump.c
index b3a663333d36..8d461303dd13 100644
--- a/arch/powerpc/kernel/fadump.c
+++ b/arch/powerpc/kernel/fadump.c
@@ -1104,7 +1104,9 @@ static ssize_t fadump_release_memory_store(struct kobject *kobj,
 		 * Take away the '/proc/vmcore'. We are releasing the dump
 		 * memory, hence it will not be valid anymore.
 		 */
+#ifdef CONFIG_PROC_VMCORE
 		vmcore_cleanup();
+#endif
I wonder if this should be fixed in crash_dump.h more generically.

Balbir Singh.

Re: powerpc/fadump: Fix build break when CONFIG_PROC_VMCORE=n

From: Michael Ellerman <hidden>
Date: 2016-10-05 02:36:29

On Fri, 2016-30-09 at 00:51:46 UTC, Michael Ellerman wrote:
The fadump code calls vmcore_cleanup() which only exists if
CONFIG_PROC_VMCORE=y. We don't want to depend on CONFIG_PROC_VMCORE,
because it's user selectable, so just wrap the call in an #ifdef.

Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Applied to powerpc next.

https://git.kernel.org/powerpc/c/2685f826e5ffd1ab73b26fd5ac4e1f

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help