diff options
| author | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@elte.hu> | 2008-09-04 07:02:35 -0400 |
| commit | 42390cdec5f6e6e2ee54f308474a6ef7dd16aa5c (patch) | |
| tree | e9684c84f53272319a5acd4b9c86503f30274a51 /net/sunrpc/sysctl.c | |
| parent | 11c231a962c740b3216eb6565149ae5a7944cba7 (diff) | |
| parent | d210baf53b699fc61aa891c177b71d7082d3b957 (diff) | |
Merge branch 'linus' into x86/x2apic
Conflicts:
arch/x86/kernel/cpu/cyrix.c
include/asm-x86/cpufeature.h
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'net/sunrpc/sysctl.c')
| -rw-r--r-- | net/sunrpc/sysctl.c | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 0f8c439b848a..5231f7aaac0e 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
| @@ -60,24 +60,14 @@ static int proc_do_xprt(ctl_table *table, int write, struct file *file, | |||
| 60 | void __user *buffer, size_t *lenp, loff_t *ppos) | 60 | void __user *buffer, size_t *lenp, loff_t *ppos) |
| 61 | { | 61 | { |
| 62 | char tmpbuf[256]; | 62 | char tmpbuf[256]; |
| 63 | int len; | 63 | size_t len; |
| 64 | |||
| 64 | if ((*ppos && !write) || !*lenp) { | 65 | if ((*ppos && !write) || !*lenp) { |
| 65 | *lenp = 0; | 66 | *lenp = 0; |
| 66 | return 0; | 67 | return 0; |
| 67 | } | 68 | } |
| 68 | if (write) | 69 | len = svc_print_xprts(tmpbuf, sizeof(tmpbuf)); |
| 69 | return -EINVAL; | 70 | return simple_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len); |
| 70 | else { | ||
| 71 | len = svc_print_xprts(tmpbuf, sizeof(tmpbuf)); | ||
| 72 | if (!access_ok(VERIFY_WRITE, buffer, len)) | ||
| 73 | return -EFAULT; | ||
| 74 | |||
| 75 | if (__copy_to_user(buffer, tmpbuf, len)) | ||
| 76 | return -EFAULT; | ||
| 77 | } | ||
| 78 | *lenp -= len; | ||
| 79 | *ppos += len; | ||
| 80 | return 0; | ||
| 81 | } | 71 | } |
| 82 | 72 | ||
| 83 | static int | 73 | static int |
