summaryrefslogtreecommitdiffstats
path: root/arch/m68k
diff options
context:
space:
mode:
authorAngelo Dureghello <angelo@sysam.it>2018-09-07 14:44:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-12-01 09:16:22 +0100
commit92ac0e3249746a852478af8c644aa81657c479ad (patch)
tree1c3731e2d014215b475f2b7c63f8109e04e73cd8 /arch/m68k
parent4ab1594e699ed2371e7ea9e6893b58e4038a40fc (diff)
downloadlinux-stable-92ac0e3249746a852478af8c644aa81657c479ad.tar.gz
linux-stable-92ac0e3249746a852478af8c644aa81657c479ad.tar.bz2
linux-stable-92ac0e3249746a852478af8c644aa81657c479ad.zip
m68k: fix command-line parsing when passed from u-boot
[ Upstream commit 381fdd62c38344a771aed06adaf14aae65c47454 ] This patch fixes command_line array zero-terminated one byte over the end of the array, causing boot to hang. Signed-off-by: Angelo Dureghello <angelo@sysam.it> Signed-off-by: Greg Ungerer <gerg@linux-m68k.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'arch/m68k')
-rw-r--r--arch/m68k/kernel/uboot.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/m68k/kernel/uboot.c b/arch/m68k/kernel/uboot.c
index b29c3b241e1b..107082877064 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -102,5 +102,5 @@ __init void process_uboot_commandline(char *commandp, int size)
}
parse_uboot_commandline(commandp, len);
- commandp[size - 1] = 0;
+ commandp[len - 1] = 0;
}