aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorHans-Joachim Picht <hans@linux.vnet.ibm.com>2010-03-24 06:49:56 -0400
committerMartin Schwidefsky <sky@mschwide.boeblingen.de.ibm.com>2010-03-24 06:49:53 -0400
commit7b26d82f5ea7de5667f87bb5ac6570111d7bff9f (patch)
treee2bd9ad9c5a0084cc66ac64a12a36a5bb8ecd1d9 /drivers/s390
parent9c95258c0d5911ae263bf50d854e402ce973ab32 (diff)
[S390] fix broken proc interface for sclp_async
This patch now allows the use of the proc interface to either activate or deactivate call home on panic. e.g. echo 1 > /proc/sys/kernel/callhome strict_strtoul() requires _either_'\n\0' _or_ '\0' termination. This was missing and therefore the interface did not recognise valid input. Signed-off-by: Hans-Joachim Picht <hans@linux.vnet.ibm.com> Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/char/sclp_async.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c
index 740fe405c395..f449c696e503 100644
--- a/drivers/s390/char/sclp_async.c
+++ b/drivers/s390/char/sclp_async.c
@@ -84,6 +84,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write,
84 rc = copy_from_user(buf, buffer, sizeof(buf)); 84 rc = copy_from_user(buf, buffer, sizeof(buf));
85 if (rc != 0) 85 if (rc != 0)
86 return -EFAULT; 86 return -EFAULT;
87 buf[len - 1] = '\0';
87 if (strict_strtoul(buf, 0, &val) != 0) 88 if (strict_strtoul(buf, 0, &val) != 0)
88 return -EINVAL; 89 return -EINVAL;
89 if (val != 0 && val != 1) 90 if (val != 0 && val != 1)