summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Dureghello <angelo@sysam.it>2018-09-07 14:44:25 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-11-28 18:28:22 +0100
commit818e60fce7e007526c912a6b0f22cab9de8aa342 (patch)
treefeefe040fc20f35dbfaf447864fbba6dd156b2e1
parent6fd2efed5bbb2e234505a57ae5559f38e3d10590 (diff)
downloadlinux-stable-818e60fce7e007526c912a6b0f22cab9de8aa342.tar.gz
linux-stable-818e60fce7e007526c912a6b0f22cab9de8aa342.tar.bz2
linux-stable-818e60fce7e007526c912a6b0f22cab9de8aa342.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>
-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 b3536a82a262..e002084af101 100644
--- a/arch/m68k/kernel/uboot.c
+++ b/arch/m68k/kernel/uboot.c
@@ -103,5 +103,5 @@ __init void process_uboot_commandline(char *commandp, int size)
}
parse_uboot_commandline(commandp, len);
- commandp[size - 1] = 0;
+ commandp[len - 1] = 0;
}