Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 109375
b: refs/heads/master
c: 27df6f2
h: refs/heads/master
i:
  109373: 69198bf
  109371: 23b9fd3
  109367: d2ad0cb
  109359: c5c8150
  109343: 89aaabd
  109311: ab708d2
v: v3
  • Loading branch information
Cyrill Gorcunov authored and J. Bruce Fields committed Sep 1, 2008
1 parent 7815bab commit ceef95a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c228c24bf1138d4757dbe20615df655815446da3
refs/heads/master: 27df6f25ff218072e0e879a96beeb398a79cdbc8
18 changes: 4 additions & 14 deletions trunk/net/sunrpc/sysctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,14 @@ static int proc_do_xprt(ctl_table *table, int write, struct file *file,
void __user *buffer, size_t *lenp, loff_t *ppos)
{
char tmpbuf[256];
int len;
size_t len;

if ((*ppos && !write) || !*lenp) {
*lenp = 0;
return 0;
}
if (write)
return -EINVAL;
else {
len = svc_print_xprts(tmpbuf, sizeof(tmpbuf));
if (!access_ok(VERIFY_WRITE, buffer, len))
return -EFAULT;

if (__copy_to_user(buffer, tmpbuf, len))
return -EFAULT;
}
*lenp -= len;
*ppos += len;
return 0;
len = svc_print_xprts(tmpbuf, sizeof(tmpbuf));
return simple_read_from_buffer(buffer, *lenp, ppos, tmpbuf, len);
}

static int
Expand Down

0 comments on commit ceef95a

Please sign in to comment.