Jorgen Hansen
2016-Apr-19 06:58 UTC
[PATCH] VSOCK: Only check error on skb_recv_datagram when skb is NULL
If skb_recv_datagram returns an skb, we should ignore the err value returned. Otherwise, datagram receives will return EAGAIN when they have to wait for a datagram. Acked-by: Adit Ranadive <aditr at vmware.com> Signed-off-by: Jorgen Hansen <jhansen at vmware.com> --- net/vmw_vsock/vmci_transport.c | 7 ++----- 1 files changed, 2 insertions(+), 5 deletions(-) diff --git a/net/vmw_vsock/vmci_transport.c b/net/vmw_vsock/vmci_transport.c index 662bdd2..5621473 100644 --- a/net/vmw_vsock/vmci_transport.c +++ b/net/vmw_vsock/vmci_transport.c @@ -1735,11 +1735,8 @@ static int vmci_transport_dgram_dequeue(struct vsock_sock *vsk, /* Retrieve the head sk_buff from the socket's receive queue. */ err = 0; skb = skb_recv_datagram(&vsk->sk, flags, noblock, &err); - if (err) - return err; - if (!skb) - return -EAGAIN; + return err; dg = (struct vmci_datagram *)skb->data; if (!dg) @@ -2154,7 +2151,7 @@ module_exit(vmci_transport_exit); MODULE_AUTHOR("VMware, Inc."); MODULE_DESCRIPTION("VMCI transport for Virtual Sockets"); -MODULE_VERSION("1.0.3.0-k"); +MODULE_VERSION("1.0.4.0-k"); MODULE_LICENSE("GPL v2"); MODULE_ALIAS("vmware_vsock"); MODULE_ALIAS_NETPROTO(PF_VSOCK); -- 1.7.0
David Miller
2016-Apr-20 00:42 UTC
[PATCH] VSOCK: Only check error on skb_recv_datagram when skb is NULL
From: Jorgen Hansen <jhansen at vmware.com> Date: Mon, 18 Apr 2016 23:58:52 -0700> If skb_recv_datagram returns an skb, we should ignore the err > value returned. Otherwise, datagram receives will return EAGAIN > when they have to wait for a datagram. > > Acked-by: Adit Ranadive <aditr at vmware.com> > Signed-off-by: Jorgen Hansen <jhansen at vmware.com>Applied.
Possibly Parallel Threads
- [PATCH] VSOCK: Only check error on skb_recv_datagram when skb is NULL
- [PATCH] VSOCK: Don't call vsock_stream_has_data in atomic context
- [PATCH] VSOCK: Don't call vsock_stream_has_data in atomic context
- [PATCH v2] VSOCK: Don't call vsock_stream_has_data in atomic context
- [PATCH v2] VSOCK: Don't call vsock_stream_has_data in atomic context