mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
udp: increment UDP_MIB_INERRORS if copy failed
In UDP recvmsg(), we miss an increase of UDP_MIB_INERRORS if the copy of skb to userspace failed for whatever reason. Reported-by: Shawn Bohrer <[email protected]> Signed-off-by: Eric Dumazet <[email protected]> Signed-off-by: David S. Miller <[email protected]>
This commit is contained in:
parent
521130d11f
commit
979402b16c
2 changed files with 16 additions and 0 deletions
|
|
@ -394,6 +394,17 @@ try_again:
|
|||
}
|
||||
if (unlikely(err)) {
|
||||
trace_kfree_skb(skb, udpv6_recvmsg);
|
||||
if (!peeked) {
|
||||
atomic_inc(&sk->sk_drops);
|
||||
if (is_udp4)
|
||||
UDP_INC_STATS_USER(sock_net(sk),
|
||||
UDP_MIB_INERRORS,
|
||||
is_udplite);
|
||||
else
|
||||
UDP6_INC_STATS_USER(sock_net(sk),
|
||||
UDP_MIB_INERRORS,
|
||||
is_udplite);
|
||||
}
|
||||
goto out_free;
|
||||
}
|
||||
if (!peeked) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue