aboutsummaryrefslogtreecommitdiffstats
path: root/net/unix/af_unix.c
diff options
context:
space:
mode:
authorSabrina Dubroca <[email protected]>2019-11-25 13:48:57 +0000
committerSteffen Klassert <[email protected]>2019-12-09 08:59:07 +0000
commitb50b0580d27bc45a0637aefc8bac4d31aa85771a (patch)
treedbae616c994ef8461a1631050e6c3bf8539acbbb /net/unix/af_unix.c
parentnet: WireGuard secure network tunnel (diff)
downloadkernel-b50b0580d27bc45a0637aefc8bac4d31aa85771a.tar.gz
kernel-b50b0580d27bc45a0637aefc8bac4d31aa85771a.zip
net: add queue argument to __skb_wait_for_more_packets and __skb_{,try_}recv_datagram
This will be used by ESP over TCP to handle the queue of IKE messages. Signed-off-by: Sabrina Dubroca <[email protected]> Acked-by: David S. Miller <[email protected]> Signed-off-by: Steffen Klassert <[email protected]>
Diffstat (limited to 'net/unix/af_unix.c')
-rw-r--r--net/unix/af_unix.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c
index 7cfdce10de36..a7f707fc4cac 100644
--- a/net/unix/af_unix.c
+++ b/net/unix/af_unix.c
@@ -2058,8 +2058,8 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
mutex_lock(&u->iolock);
skip = sk_peek_offset(sk, flags);
- skb = __skb_try_recv_datagram(sk, flags, NULL, &skip, &err,
- &last);
+ skb = __skb_try_recv_datagram(sk, &sk->sk_receive_queue, flags,
+ NULL, &skip, &err, &last);
if (skb)
break;
@@ -2068,7 +2068,8 @@ static int unix_dgram_recvmsg(struct socket *sock, struct msghdr *msg,
if (err != -EAGAIN)
break;
} while (timeo &&
- !__skb_wait_for_more_packets(sk, &err, &timeo, last));
+ !__skb_wait_for_more_packets(sk, &sk->sk_receive_queue,
+ &err, &timeo, last));
if (!skb) { /* implies iolock unlocked */
unix_state_lock(sk);