s390/keyboard: use memdup_user_nul()
authorMuhammad Falak R Wani <falakreyaz@gmail.com>
Fri, 20 May 2016 13:21:20 +0000 (18:51 +0530)
committerMartin Schwidefsky <schwidefsky@de.ibm.com>
Mon, 13 Jun 2016 13:58:12 +0000 (15:58 +0200)
commitfd346c9dae6b266f8c3f62df20237059a3a90312
tree33658f9b194c4737d949e7a9e75b3d3181418679
parent1c343f7b0e177e8ca7f4d4a5dd1fa790f85abbcc
s390/keyboard: use memdup_user_nul()

Use memdup_user_nul to duplicate a memory region from user-space
to kernel-space and terminate with a NULL, instead of open coding
using kmalloc + copy_from_user and explicitly NULL terminating.

Signed-off-by: Muhammad Falak R Wani <falakreyaz@gmail.com>
[heiko.carstens@de.ibm.com: remove comment]
Signed-off-by: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
drivers/s390/char/keyboard.c