summaryrefslogtreecommitdiffstats
path: root/drivers/s390/char/sclp_async.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-08-04 06:35:51 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2011-08-04 06:35:51 -1000
commit447e1363bc2cc80fa9205a51a4f86d83c35b54a4 (patch)
tree2ef6cba5de8b0e68e141d0e5330539962ed2bf48 /drivers/s390/char/sclp_async.c
parent82de9a0cc34bc1640c4f133f13d62a765596b2b9 (diff)
parent9e8ed3ae924b65ab5f088fe63ee6f4326f04590f (diff)
downloadlinux-447e1363bc2cc80fa9205a51a4f86d83c35b54a4.tar.bz2
Merge branch 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6
* 'for-linus' of git://git390.marist.edu/pub/scm/linux-2.6: [S390] signal: use set_restore_sigmask() helper [S390] smp: remove pointless comments in startup_secondary() [S390] qdio: Use kstrtoul_from_user [S390] sclp_async: Use kstrtoul_from_user [S390] exec: remove redundant set_fs(USER_DS) [S390] cpu hotplug: on cpu start wait until being marked active [S390] signal: convert to use set_current_blocked() [S390] asm offsets: fix coding style [S390] Add support for IBM zEnterprise 114 [S390] dasd: check if raw track access is supported [S390] Use diagnose 308 for system reset [S390] Export store_status() function [S390] dasd: use vmalloc for statistics input buffer [S390] Add PSW restart shutdown trigger [S390] missing return in page_table_alloc_pgste [S390] qdio: 2nd stage retry on SIGA-W busy conditions
Diffstat (limited to 'drivers/s390/char/sclp_async.c')
-rw-r--r--drivers/s390/char/sclp_async.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c
index 7ad30e72f868..5f9f929e891c 100644
--- a/drivers/s390/char/sclp_async.c
+++ b/drivers/s390/char/sclp_async.c
@@ -82,12 +82,9 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write,
return -EFAULT;
} else {
len = *count;
- 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;
+ rc = kstrtoul_from_user(buffer, len, 0, &val);
+ if (rc)
+ return rc;
if (val != 0 && val != 1)
return -EINVAL;
callhome_enabled = val;