]> git.baikalelectronics.ru Git - kernel.git/commit
net: fix __skb_try_recv_from_queue to return the old behavior
authorAndrey Vagin <avagin@openvz.org>
Wed, 17 May 2017 18:39:05 +0000 (11:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 18 May 2017 14:32:58 +0000 (10:32 -0400)
commit93d9a325a3f8c8be06952c047a963e4af6fe3538
tree9ad79c96c56f8380b39b4ef81514a6aa5dbb798b
parentf84d5ce68681a46f09eed5db0f3e590e9d06b3c1
net: fix __skb_try_recv_from_queue to return the old behavior

This function has to return NULL on a error case, because there is a
separate error variable.

The offset has to be changed only if skb is returned

v2: fix udp code to not use an extra variable

Cc: Paolo Abeni <pabeni@redhat.com>
Cc: Eric Dumazet <edumazet@google.com>
Cc: David S. Miller <davem@davemloft.net>
Fixes: 79f3a5466530 ("net/sock: factor out dequeue/peek with offset cod")
Signed-off-by: Andrei Vagin <avagin@openvz.org>
Acked-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/datagram.c
net/ipv4/udp.c