diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-09 21:11:22 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-11-09 21:11:22 -0500 |
commit | e6604ecb70d4b1dbc0372c6518b51c25c4b135a1 (patch) | |
tree | 2d12c51b84c3ba8472e59ddbe37da034e2c5251f /net/sunrpc/sysctl.c | |
parent | 9d74288ca79249af4b906215788b37d52263b58b (diff) | |
parent | 941c3ff3102ccce440034d59cf9e4e9cc10b720d (diff) |
Merge tag 'nfs-for-4.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs
Pull NFS client updates from Trond Myklebust:
"Highlights include:
New features:
- RDMA client backchannel from Chuck
- Support for NFSv4.2 file CLONE using the btrfs ioctl
Bugfixes + cleanups:
- Move socket data receive out of the bottom halves and into a
workqueue
- Refactor NFSv4 error handling so synchronous and asynchronous RPC
handles errors identically.
- Fix a panic when blocks or object layouts reads return a bad data
length
- Fix nfsroot so it can handle a 1024 byte long path.
- Fix bad usage of page offset in bl_read_pagelist
- Various NFSv4 callback cleanups+fixes
- Fix GETATTR bitmap verification
- Support hexadecimal number for sunrpc debug sysctl files"
* tag 'nfs-for-4.4-1' of git://git.linux-nfs.org/projects/trondmy/linux-nfs: (53 commits)
Sunrpc: Supports hexadecimal number for sysctl files of sunrpc debug
nfs: Fix GETATTR bitmap verification
nfs: Remove unused xdr page offsets in getacl/setacl arguments
fs/nfs: remove unnecessary new_valid_dev check
SUNRPC: fix variable type
NFS: Enable client side NFSv4.1 backchannel to use other transports
pNFS/flexfiles: Add support for FF_FLAGS_NO_IO_THRU_MDS
pNFS/flexfiles: When mirrored, retry failed reads by switching mirrors
SUNRPC: Remove the TCP-only restriction in bc_svc_process()
svcrdma: Add backward direction service for RPC/RDMA transport
xprtrdma: Handle incoming backward direction RPC calls
xprtrdma: Add support for sending backward direction RPC replies
xprtrdma: Pre-allocate Work Requests for backchannel
xprtrdma: Pre-allocate backward rpc_rqst and send/receive buffers
SUNRPC: Abstract backchannel operations
xprtrdma: Saving IRQs no longer needed for rb_lock
xprtrdma: Remove reply tasklet
xprtrdma: Use workqueue to process RPC/RDMA replies
xprtrdma: Replace send and receive arrays
xprtrdma: Refactor reply handler error handling
...
Diffstat (limited to 'net/sunrpc/sysctl.c')
-rw-r--r-- | net/sunrpc/sysctl.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/net/sunrpc/sysctl.c b/net/sunrpc/sysctl.c index 887f0183b4c6..c88d9bc06f5c 100644 --- a/net/sunrpc/sysctl.c +++ b/net/sunrpc/sysctl.c | |||
@@ -76,7 +76,7 @@ static int | |||
76 | proc_dodebug(struct ctl_table *table, int write, | 76 | proc_dodebug(struct ctl_table *table, int write, |
77 | void __user *buffer, size_t *lenp, loff_t *ppos) | 77 | void __user *buffer, size_t *lenp, loff_t *ppos) |
78 | { | 78 | { |
79 | char tmpbuf[20], c, *s; | 79 | char tmpbuf[20], c, *s = NULL; |
80 | char __user *p; | 80 | char __user *p; |
81 | unsigned int value; | 81 | unsigned int value; |
82 | size_t left, len; | 82 | size_t left, len; |
@@ -103,23 +103,24 @@ proc_dodebug(struct ctl_table *table, int write, | |||
103 | return -EFAULT; | 103 | return -EFAULT; |
104 | tmpbuf[left] = '\0'; | 104 | tmpbuf[left] = '\0'; |
105 | 105 | ||
106 | for (s = tmpbuf, value = 0; '0' <= *s && *s <= '9'; s++, left--) | 106 | value = simple_strtol(tmpbuf, &s, 0); |
107 | value = 10 * value + (*s - '0'); | 107 | if (s) { |
108 | if (*s && !isspace(*s)) | 108 | left -= (s - tmpbuf); |
109 | return -EINVAL; | 109 | if (left && !isspace(*s)) |
110 | while (left && isspace(*s)) | 110 | return -EINVAL; |
111 | left--, s++; | 111 | while (left && isspace(*s)) |
112 | left--, s++; | ||
113 | } else | ||
114 | left = 0; | ||
112 | *(unsigned int *) table->data = value; | 115 | *(unsigned int *) table->data = value; |
113 | /* Display the RPC tasks on writing to rpc_debug */ | 116 | /* Display the RPC tasks on writing to rpc_debug */ |
114 | if (strcmp(table->procname, "rpc_debug") == 0) | 117 | if (strcmp(table->procname, "rpc_debug") == 0) |
115 | rpc_show_tasks(&init_net); | 118 | rpc_show_tasks(&init_net); |
116 | } else { | 119 | } else { |
117 | if (!access_ok(VERIFY_WRITE, buffer, left)) | 120 | len = sprintf(tmpbuf, "0x%04x", *(unsigned int *) table->data); |
118 | return -EFAULT; | ||
119 | len = sprintf(tmpbuf, "%d", *(unsigned int *) table->data); | ||
120 | if (len > left) | 121 | if (len > left) |
121 | len = left; | 122 | len = left; |
122 | if (__copy_to_user(buffer, tmpbuf, len)) | 123 | if (copy_to_user(buffer, tmpbuf, len)) |
123 | return -EFAULT; | 124 | return -EFAULT; |
124 | if ((left -= len) > 0) { | 125 | if ((left -= len) > 0) { |
125 | if (put_user('\n', (char __user *)buffer + len)) | 126 | if (put_user('\n', (char __user *)buffer + len)) |