Skip to content

Commit

Permalink
[S390] fix broken proc interface for sclp_async
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Hans-Joachim Picht authored and Martin Schwidefsky committed Mar 24, 2010
1 parent 9c95258 commit 7b26d82
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/s390/char/sclp_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,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[len - 1] = '\0';
if (strict_strtoul(buf, 0, &val) != 0)
return -EINVAL;
if (val != 0 && val != 1)
Expand Down

0 comments on commit 7b26d82

Please sign in to comment.