Paolo Abeni 6c206b2009 udp: fix rx queue len reported by diag and proc interface
After commit 6b229cf77d68 ("udp: add batching to udp_rmem_release()")
the sk_rmem_alloc field does not measure exactly anymore the
receive queue length, because we batch the rmem release. The issue
is really apparent only after commit 0d4a6608f68c ("udp: do rmem bulk
free even if the rx sk queue is empty"): the user space can easily
check for an empty socket with not-0 queue length reported by the 'ss'
tool or the procfs interface.

We need to use a custom UDP helper to report the correct queue length,
taking into account the forward allocation deficit.

Reported-by: trevor.francis@46labs.com
Fixes: 6b229cf77d68 ("UDP: add batching to udp_rmem_release()")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-06-08 19:55:15 -04:00
..
2018-05-26 09:16:44 +02:00
2018-05-24 14:22:59 -07:00
2018-05-31 14:13:43 -04:00
2018-05-26 09:16:44 +02:00
2018-03-27 13:18:09 -04:00
2018-05-04 12:54:38 -04:00
2018-06-02 09:55:44 -07:00
2018-05-28 22:59:54 -04:00
2018-06-05 10:21:18 -04:00