summaryrefslogtreecommitdiffstats
path: root/init/initramfs.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-05-19 12:15:32 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-19 12:15:32 -0700
commitcb6f8739fbf98203d0fb0bc2c2dbbec0ddfe978a (patch)
treebdb69f5b9fb5a3e7b6810319468706bad2b6e1ac /init/initramfs.c
parentff8583d6e4e33fe3856a609095c683d5dbe39120 (diff)
parentde6da1e8bcf0dd2058b950b127491821207679dc (diff)
downloadlinux-cb6f8739fbf98203d0fb0bc2c2dbbec0ddfe978a.tar.bz2
Merge branch 'akpm' (patches from Andrew)
Merge yet more updates from Andrew Morton: "A few final bits: - large changes to vmalloc, yielding large performance benefits - tweak the console-flush-on-panic code - a few fixes" * emailed patches from Andrew Morton <akpm@linux-foundation.org>: panic: add an option to replay all the printk message in buffer initramfs: don't free a non-existent initrd fs/writeback.c: use rcu_barrier() to wait for inflight wb switches going into workqueue when umount mm/compaction.c: correct zone boundary handling when isolating pages from a pageblock mm/vmap: add DEBUG_AUGMENT_LOWEST_MATCH_CHECK macro mm/vmap: add DEBUG_AUGMENT_PROPAGATE_CHECK macro mm/vmalloc.c: keep track of free blocks for vmap allocation
Diffstat (limited to 'init/initramfs.c')
-rw-r--r--init/initramfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/init/initramfs.c b/init/initramfs.c
index 435a428c2af1..178130fd61c2 100644
--- a/init/initramfs.c
+++ b/init/initramfs.c
@@ -669,7 +669,7 @@ done:
* 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;