diff options
Diffstat (limited to 'net/llc/af_llc.c')
-rw-r--r-- | net/llc/af_llc.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/net/llc/af_llc.c b/net/llc/af_llc.c index 5a04db745c8d..75c9b1480801 100644 --- a/net/llc/af_llc.c +++ b/net/llc/af_llc.c | |||
@@ -674,7 +674,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
674 | 674 | ||
675 | lock_sock(sk); | 675 | lock_sock(sk); |
676 | copied = -ENOTCONN; | 676 | copied = -ENOTCONN; |
677 | if (sk->sk_state == TCP_LISTEN) | 677 | if (unlikely(sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_LISTEN)) |
678 | goto out; | 678 | goto out; |
679 | 679 | ||
680 | timeo = sock_rcvtimeo(sk, nonblock); | 680 | timeo = sock_rcvtimeo(sk, nonblock); |
@@ -733,7 +733,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
733 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 733 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
734 | break; | 734 | break; |
735 | 735 | ||
736 | if (sk->sk_state == TCP_CLOSE) { | 736 | if (sk->sk_type == SOCK_STREAM && sk->sk_state == TCP_CLOSE) { |
737 | if (!sock_flag(sk, SOCK_DONE)) { | 737 | if (!sock_flag(sk, SOCK_DONE)) { |
738 | /* | 738 | /* |
739 | * This occurs when user tries to read | 739 | * This occurs when user tries to read |
@@ -789,7 +789,7 @@ static int llc_ui_recvmsg(struct kiocb *iocb, struct socket *sock, | |||
789 | continue; | 789 | continue; |
790 | 790 | ||
791 | if (!(flags & MSG_PEEK)) { | 791 | if (!(flags & MSG_PEEK)) { |
792 | sk_eat_skb(sk, skb); | 792 | sk_eat_skb(sk, skb, 0); |
793 | *seq = 0; | 793 | *seq = 0; |
794 | } | 794 | } |
795 | } while (len > 0); | 795 | } while (len > 0); |