summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSteven Price <steven.price@arm.com>2019-05-17 14:31:47 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-18 15:52:26 -0700
commit5d59aa8f9ce972b472201aed86e904bb75879ff0 (patch)
tree4584b44a49d089b3a991a0f0a2d25f01b8cc2a95 /fs
parentec084de929e419e51bcdafaafe567d9e7d0273b7 (diff)
downloadlinux-5d59aa8f9ce972b472201aed86e904bb75879ff0.tar.bz2
initramfs: don't free a non-existent initrd
Since commit 54c7a8916a88 ("initramfs: free initrd memory if opening /initrd.image fails"), the kernel has unconditionally attempted to free the initrd even if it doesn't exist. In the non-existent case this causes a boot-time splat if CONFIG_DEBUG_VIRTUAL is enabled due to a call to virt_to_phys() with a NULL address. Instead we should check that the initrd actually exists and only attempt to free it if it does. Link: http://lkml.kernel.org/r/20190516143125.48948-1-steven.price@arm.com Fixes: 54c7a8916a88 ("initramfs: free initrd memory if opening /initrd.image fails") Signed-off-by: Steven Price <steven.price@arm.com> Reported-by: Mark Rutland <mark.rutland@arm.com> Tested-by: Mark Rutland <mark.rutland@arm.com> 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>
Diffstat (limited to 'fs')
0 files changed, 0 insertions, 0 deletions