summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 11:48:17 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2019-09-16 11:48:17 -0400
commit6fa58f34ee35d05e525819f2eb24b01b773de7d3 (patch)
tree52a4501075bed6daf363ae3a29e84cbd5c951774
parent7a0dd4cc0d702a02dac7e7c8494965758aba40a9 (diff)
downloadlongterm-queue-4.18-6fa58f34ee35d05e525819f2eb24b01b773de7d3.tar.gz
initramfs: adapt if statement for older code base
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
-rw-r--r--queue/initramfs-don-t-free-a-non-existent-initrd.patch17
1 files changed, 9 insertions, 8 deletions
diff --git a/queue/initramfs-don-t-free-a-non-existent-initrd.patch b/queue/initramfs-don-t-free-a-non-existent-initrd.patch
index d908b04..c9b8fc0 100644
--- a/queue/initramfs-don-t-free-a-non-existent-initrd.patch
+++ b/queue/initramfs-don-t-free-a-non-existent-initrd.patch
@@ -1,4 +1,4 @@
-From 5d59aa8f9ce972b472201aed86e904bb75879ff0 Mon Sep 17 00:00:00 2001
+From 06f3f9e78936ef79e32c90d829ad8355012dc91b Mon Sep 17 00:00:00 2001
From: Steven Price <steven.price@arm.com>
Date: Fri, 17 May 2019 14:31:47 -0700
Subject: [PATCH] initramfs: don't free a non-existent initrd
@@ -25,20 +25,21 @@ Reviewed-by: Mike Rapoport <rppt@linux.ibm.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
+Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
diff --git a/init/initramfs.c b/init/initramfs.c
-index 435a428c2af1..178130fd61c2 100644
+index d638443e12ac..52e978e12236 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
-@@ -669,7 +669,7 @@ static int __init populate_rootfs(void)
+@@ -542,7 +542,7 @@ static void __init free_initrd(void)
* If the initrd region is overlapped with crashkernel reserved region,
* free only memory that is not part of crashkernel region.
*/
-- if (!do_retain_initrd && !kexec_free_initrd())
-+ if (!do_retain_initrd && initrd_start && !kexec_free_initrd())
- free_initrd_mem(initrd_start, initrd_end);
- initrd_start = 0;
- initrd_end = 0;
+- if (initrd_start < crashk_end && initrd_end > crashk_start) {
++ if (initrd_start && initrd_start < crashk_end && initrd_end > crashk_start) {
+ /*
+ * Initialize initrd memory region since the kexec boot does
+ * not do.
--
2.7.4