Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 79653
b: refs/heads/master
c: 7df0899
h: refs/heads/master
i:
  79651: 82bf57a
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Jan 30, 2008
1 parent 0c28973 commit 10b5b53
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 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: 59dca3b28cb915745019d4f4c27d97b6b6ab12c6
refs/heads/master: 7df089952fca41cb336733e1167c0a25e5a025d8
13 changes: 6 additions & 7 deletions trunk/net/sunrpc/auth_gss/auth_gss.c
Original file line number Diff line number Diff line change
Expand Up @@ -472,16 +472,15 @@ gss_pipe_upcall(struct file *filp, struct rpc_pipe_msg *msg,
char __user *dst, size_t buflen)
{
char *data = (char *)msg->data + msg->copied;
ssize_t mlen = msg->len;
ssize_t left;
size_t mlen = min(msg->len, buflen);
unsigned long left;

if (mlen > buflen)
mlen = buflen;
left = copy_to_user(dst, data, mlen);
if (left < 0) {
msg->errno = left;
return left;
if (left == mlen) {
msg->errno = -EFAULT;
return -EFAULT;
}

mlen -= left;
msg->copied += mlen;
msg->errno = 0;
Expand Down

0 comments on commit 10b5b53

Please sign in to comment.