diff options
author | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
---|---|---|
committer | Andrea Bastoni <bastoni@cs.unc.edu> | 2010-05-30 19:16:45 -0400 |
commit | ada47b5fe13d89735805b566185f4885f5a3f750 (patch) | |
tree | 644b88f8a71896307d71438e9b3af49126ffb22b /drivers/s390/char/sclp_async.c | |
parent | 43e98717ad40a4ae64545b5ba047c7b86aa44f4f (diff) | |
parent | 3280f21d43ee541f97f8cda5792150d2dbec20d5 (diff) |
Merge branch 'wip-2.6.34' into old-private-masterarchived-private-master
Diffstat (limited to 'drivers/s390/char/sclp_async.c')
-rw-r--r-- | drivers/s390/char/sclp_async.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/s390/char/sclp_async.c b/drivers/s390/char/sclp_async.c index b44462a6c6d3..7ad30e72f868 100644 --- a/drivers/s390/char/sclp_async.c +++ b/drivers/s390/char/sclp_async.c | |||
@@ -11,6 +11,7 @@ | |||
11 | #include <linux/device.h> | 11 | #include <linux/device.h> |
12 | #include <linux/stat.h> | 12 | #include <linux/stat.h> |
13 | #include <linux/string.h> | 13 | #include <linux/string.h> |
14 | #include <linux/slab.h> | ||
14 | #include <linux/ctype.h> | 15 | #include <linux/ctype.h> |
15 | #include <linux/kmod.h> | 16 | #include <linux/kmod.h> |
16 | #include <linux/err.h> | 17 | #include <linux/err.h> |
@@ -84,6 +85,7 @@ static int proc_handler_callhome(struct ctl_table *ctl, int write, | |||
84 | rc = copy_from_user(buf, buffer, sizeof(buf)); | 85 | rc = copy_from_user(buf, buffer, sizeof(buf)); |
85 | if (rc != 0) | 86 | if (rc != 0) |
86 | return -EFAULT; | 87 | return -EFAULT; |
88 | buf[sizeof(buf) - 1] = '\0'; | ||
87 | if (strict_strtoul(buf, 0, &val) != 0) | 89 | if (strict_strtoul(buf, 0, &val) != 0) |
88 | return -EINVAL; | 90 | return -EINVAL; |
89 | if (val != 0 && val != 1) | 91 | if (val != 0 && val != 1) |
@@ -101,18 +103,17 @@ static struct ctl_table callhome_table[] = { | |||
101 | .mode = 0644, | 103 | .mode = 0644, |
102 | .proc_handler = proc_handler_callhome, | 104 | .proc_handler = proc_handler_callhome, |
103 | }, | 105 | }, |
104 | { .ctl_name = 0 } | 106 | {} |
105 | }; | 107 | }; |
106 | 108 | ||
107 | static struct ctl_table kern_dir_table[] = { | 109 | static struct ctl_table kern_dir_table[] = { |
108 | { | 110 | { |
109 | .ctl_name = CTL_KERN, | ||
110 | .procname = "kernel", | 111 | .procname = "kernel", |
111 | .maxlen = 0, | 112 | .maxlen = 0, |
112 | .mode = 0555, | 113 | .mode = 0555, |
113 | .child = callhome_table, | 114 | .child = callhome_table, |
114 | }, | 115 | }, |
115 | { .ctl_name = 0 } | 116 | {} |
116 | }; | 117 | }; |
117 | 118 | ||
118 | /* | 119 | /* |