Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 276957
b: refs/heads/master
c: 9cef310
h: refs/heads/master
i:
  276955: 52066c3
v: v3
  • Loading branch information
Alex Juncu authored and David S. Miller committed Dec 19, 2011
1 parent fbf5df7 commit 0fe9fe5
Show file tree
Hide file tree
Showing 2 changed files with 11 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: a03ffcf873fe0f2565386ca8ef832144c42e67fa
refs/heads/master: 9cef310fcdee12b49b8b4c96fd8f611c8873d284
14 changes: 10 additions & 4 deletions trunk/net/llc/af_llc.c
Original file line number Diff line number Diff line change
Expand Up @@ -833,15 +833,15 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
copied += used;
len -= used;

/* For non stream protcols we get one packet per recvmsg call */
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;

if (!(flags & MSG_PEEK)) {
sk_eat_skb(sk, skb, 0);
*seq = 0;
}

/* For non stream protcols we get one packet per recvmsg call */
if (sk->sk_type != SOCK_STREAM)
goto copy_uaddr;

/* Partial read */
if (used + offset < skb->len)
continue;
Expand All @@ -857,6 +857,12 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock,
}
if (llc_sk(sk)->cmsg_flags)
llc_cmsg_rcv(msg, skb);

if (!(flags & MSG_PEEK)) {
sk_eat_skb(sk, skb, 0);
*seq = 0;
}

goto out;
}

Expand Down

0 comments on commit 0fe9fe5

Please sign in to comment.