console: Fix console name size mismatch
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 1 Mar 2015 15:11:05 +0000 (10:11 -0500)
committerBen Hutchings <ben@decadent.org.uk>
Sat, 9 May 2015 22:16:24 +0000 (23:16 +0100)
commit3bfc26c04b9cb9e520e0a7d65e838357565c056f
tree0dfd2b3e8db623558afab8f17668429b42411aef
parent52220b428973e533ba074a818d65aee1f78a2618
console: Fix console name size mismatch

commit 30a22c215a0007603ffc08021f2e8b64018517dd upstream.

commit 6ae9200f2cab7 ("enlarge console.name") increased the storage
for the console name to 16 bytes, but not the corresponding
struct console_cmdline::name storage. Console names longer than
8 bytes cause read beyond end-of-string and failure to match
console; I'm not sure if there are other unexpected consequences.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
[bwh: Backported to 3.2:
 - Adjust filename
 - Use console_cmdline[i] instead of *c]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
kernel/printk.c