]> git.baikalelectronics.ru Git - kernel.git/commit
arm64: kexec_file: handle empty command-line
authorJean-Philippe Brucker <jean-philippe.brucker@arm.com>
Fri, 1 Feb 2019 16:26:08 +0000 (16:26 +0000)
committerWill Deacon <will.deacon@arm.com>
Tue, 5 Feb 2019 09:34:49 +0000 (09:34 +0000)
commitaef4879dd12f8bc2902cebd2073e2161c29b3186
treecc5eae5f498457b244da24775b0425f520bb5286
parent0040156facdf1cc8b29e5fdc88a91a92f8288e68
arm64: kexec_file: handle empty command-line

Calling strlen() on cmdline == NULL produces a kernel oops. Since having
a NULL cmdline is valid, handle this case explicitly.

Fixes: f21e973e678a ("arm64: kexec_file: load initrd and device-tree")
Signed-off-by: Jean-Philippe Brucker <jean-philippe.brucker@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
arch/arm64/kernel/machine_kexec_file.c