Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 97928
b: refs/heads/master
c: 6b6707a
h: refs/heads/master
v: v3
  • Loading branch information
James Chapman authored and David S. Miller committed Jun 10, 2008
1 parent 37734ce commit 21aeca7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 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: 2e761e0532a784816e7e822dbaaece8c5d4be14d
refs/heads/master: 6b6707a50c7598a83820077393f8823ab791abf8
20 changes: 12 additions & 8 deletions trunk/drivers/net/pppol2tp.c
Original file line number Diff line number Diff line change
Expand Up @@ -783,14 +783,18 @@ static int pppol2tp_recvmsg(struct kiocb *iocb, struct socket *sock,
err = 0;
skb = skb_recv_datagram(sk, flags & ~MSG_DONTWAIT,
flags & MSG_DONTWAIT, &err);
if (skb) {
err = memcpy_toiovec(msg->msg_iov, (unsigned char *) skb->data,
skb->len);
if (err < 0)
goto do_skb_free;
err = skb->len;
}
do_skb_free:
if (!skb)
goto end;

if (len > skb->len)
len = skb->len;
else if (len < skb->len)
msg->msg_flags |= MSG_TRUNC;

err = skb_copy_datagram_iovec(skb, 0, msg->msg_iov, len);
if (likely(err == 0))
err = len;

kfree_skb(skb);
end:
return err;
Expand Down

0 comments on commit 21aeca7

Please sign in to comment.