Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 93086
b: refs/heads/master
c: 8d390ef
h: refs/heads/master
v: v3
  • Loading branch information
Tom Quetchenbach authored and David S. Miller committed Apr 25, 2008
1 parent 2e0c7ad commit 45f3b6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 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: a5d6ab56daa439d681aab29955498486e452224d
refs/heads/master: 8d390efd903485923419584275fd0c2aa4c94183
9 changes: 4 additions & 5 deletions trunk/net/ipv4/tcp_probe.c
Original file line number Diff line number Diff line change
Expand Up @@ -190,19 +190,18 @@ static ssize_t tcpprobe_read(struct file *file, char __user *buf,

width = tcpprobe_sprint(tbuf, sizeof(tbuf));

if (width < len)
if (cnt + width < len)
tcp_probe.tail = (tcp_probe.tail + 1) % bufsize;

spin_unlock_bh(&tcp_probe.lock);

/* if record greater than space available
return partial buffer (so far) */
if (width >= len)
if (cnt + width >= len)
break;

error = copy_to_user(buf + cnt, tbuf, width);
if (error)
break;
if (copy_to_user(buf + cnt, tbuf, width))
return -EFAULT;
cnt += width;
}

Expand Down

0 comments on commit 45f3b6f

Please sign in to comment.