diff options
| author | Steve French <sfrench@us.ibm.com> | 2005-12-31 13:27:22 -0500 | 
|---|---|---|
| committer | Steve French <sfrench@us.ibm.com> | 2005-12-31 13:27:22 -0500 | 
| commit | eea60caef610c7a6c58c0de9c80ae1e438e01301 (patch) | |
| tree | 25e19289bba003fe085e589430d0d981fd6b73a7 /kernel/sysctl.c | |
| parent | da8543ef125afc7bba4da526b61a1ae07dc25109 (diff) | |
| parent | 82c9df820112c6286a8e8fbe482e94b65b49062c (diff) | |
Merge with /pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Signed-off-by: Steve French <sfrench@us.ibm.com>
Diffstat (limited to 'kernel/sysctl.c')
| -rw-r--r-- | kernel/sysctl.c | 6 | 
1 files changed, 2 insertions, 4 deletions
| diff --git a/kernel/sysctl.c b/kernel/sysctl.c index 9990e10192e8..e5102ea6e104 100644 --- a/kernel/sysctl.c +++ b/kernel/sysctl.c | |||
| @@ -2201,14 +2201,12 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen, | |||
| 2201 | if (get_user(len, oldlenp)) | 2201 | if (get_user(len, oldlenp)) | 
| 2202 | return -EFAULT; | 2202 | return -EFAULT; | 
| 2203 | if (len) { | 2203 | if (len) { | 
| 2204 | l = strlen(table->data); | 2204 | l = strlen(table->data)+1; | 
| 2205 | if (len > l) len = l; | 2205 | if (len > l) len = l; | 
| 2206 | if (len >= table->maxlen) | 2206 | if (len >= table->maxlen) | 
| 2207 | len = table->maxlen; | 2207 | len = table->maxlen; | 
| 2208 | if(copy_to_user(oldval, table->data, len)) | 2208 | if(copy_to_user(oldval, table->data, len)) | 
| 2209 | return -EFAULT; | 2209 | return -EFAULT; | 
| 2210 | if(put_user(0, ((char __user *) oldval) + len)) | ||
| 2211 | return -EFAULT; | ||
| 2212 | if(put_user(len, oldlenp)) | 2210 | if(put_user(len, oldlenp)) | 
| 2213 | return -EFAULT; | 2211 | return -EFAULT; | 
| 2214 | } | 2212 | } | 
| @@ -2223,7 +2221,7 @@ int sysctl_string(ctl_table *table, int __user *name, int nlen, | |||
| 2223 | len--; | 2221 | len--; | 
| 2224 | ((char *) table->data)[len] = 0; | 2222 | ((char *) table->data)[len] = 0; | 
| 2225 | } | 2223 | } | 
| 2226 | return 0; | 2224 | return 1; | 
| 2227 | } | 2225 | } | 
| 2228 | 2226 | ||
| 2229 | /* | 2227 | /* | 
