Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93130
b: refs/heads/master
c: 653252c
h: refs/heads/master
v: v3
  • Loading branch information
Pavel Emelyanov authored and David S. Miller committed Apr 25, 2008
1 parent 0a1216c commit 43af5b3
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 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: cc93d7d77d28d65d4f947dabc95a01c42d713ea3
refs/heads/master: 653252c2302cdf2dfbca66a7e177f7db783f9efa
3 changes: 2 additions & 1 deletion trunk/net/can/raw.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,8 @@ static int raw_getsockopt(struct socket *sock, int level, int optname,
int fsize = ro->count * sizeof(struct can_filter);
if (len > fsize)
len = fsize;
err = copy_to_user(optval, ro->filter, len);
if (copy_to_user(optval, ro->filter, len))
err = -EFAULT;
} else
len = 0;
release_sock(sk);
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/dccp/probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ static ssize_t dccpprobe_read(struct file *file, char __user *buf,
goto out_free;

cnt = kfifo_get(dccpw.fifo, tbuf, len);
error = copy_to_user(buf, tbuf, cnt);
error = copy_to_user(buf, tbuf, cnt) ? -EFAULT : 0;

out_free:
vfree(tbuf);
Expand Down
4 changes: 2 additions & 2 deletions trunk/net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -1756,8 +1756,8 @@ static int getsockopt(struct socket *sock,
else if (len < sizeof(value)) {
res = -EINVAL;
}
else if ((res = copy_to_user(ov, &value, sizeof(value)))) {
/* couldn't return value */
else if (copy_to_user(ov, &value, sizeof(value))) {
res = -EFAULT;
}
else {
res = put_user(sizeof(value), ol);
Expand Down

0 comments on commit 43af5b3

Please sign in to comment.