s390/sclp: always stay within bounds of the early sccb
authorHeiko Carstens <heiko.carstens@de.ibm.com>
Wed, 11 Jan 2017 10:07:39 +0000 (11:07 +0100)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 16 Jan 2017 06:27:55 +0000 (07:27 +0100)
commitf0319748599183fa71a1e8792317385313ed946b
tree5617c5161fce65aeeb19f85ea153e3213ef914f1
parent742dc5773cf5bbb355e4b4dd61310d5f51556477
s390/sclp: always stay within bounds of the early sccb

Make sure the _sclp_print_lm function stays within bounds of the early
sccb, even if the passed string is very long.  If the string is too
long, the remaining characters will be dropped.

Suggested-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Reviewed-by: Peter Oberparleiter <oberpar@linux.vnet.ibm.com>
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
arch/s390/kernel/sclp.c