summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_async.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/s390/char/sclp_async.c')
-rw-r--r--drivers/s390/char/sclp_async.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c
index 740fe40..7ad30e7 100644
--- a/drivers/s390/char/sclp_async.c
+++ b/drivers/s390/char/sclp_async.c
@@ -11,6 +11,7 @@
#include <linux/device.h>
#include <linux/stat.h>
#include <linux/string.h>
+#include <linux/slab.h>
#include <linux/ctype.h>
#include <linux/kmod.h>
#include <linux/err.h>
@@ -84,6 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write,
rc = copy_from_user(buf, buffer, sizeof(buf));
if (rc != 0)
return -EFAULT;
+ buf[sizeof(buf) - 1] = '\0';
if (strict_strtoul(buf, 0, &val) != 0)
return -EINVAL;
if (val != 0 && val != 1)
OpenPOWER on IntegriCloud