Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7b26d82f authored by Hans-Joachim Picht's avatar Hans-Joachim Picht Committed by Martin Schwidefsky
Browse files

[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: default avatarHans-Joachim Picht <hans@linux.vnet.ibm.com>
Signed-off-by: default avatarMartin Schwidefsky <schwidefsky@de.ibm.com>
parent 9c95258c
Loading
Loading
Loading
Loading
+1 −0
Original line number Original line Diff line number Diff line
@@ -84,6 +84,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write,
		rc = copy_from_user(buf, buffer, sizeof(buf));
		rc = copy_from_user(buf, buffer, sizeof(buf));
		if (rc != 0)
		if (rc != 0)
			return -EFAULT;
			return -EFAULT;
		buf[len - 1] = '\0';
		if (strict_strtoul(buf, 0, &val) != 0)
		if (strict_strtoul(buf, 0, &val) != 0)
			return -EINVAL;
			return -EINVAL;
		if (val != 0 && val != 1)
		if (val != 0 && val != 1)