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-03-27 13:18:09 -04:00
2018-06-03 00:02:05 +02:00
2018-03-27 13:18:09 -04:00
2018-05-11 00:10:56 +02:00
2017-05-21 13:42:36 -04:00
2018-03-27 13:18:09 -04:00
2018-04-26 15:07:42 -04:00
2018-02-28 11:43:28 -05:00
2018-05-24 11:57:35 +02:00
2016-12-25 17:21:23 +01:00
2018-05-16 07:24:30 +02:00
2018-05-16 07:24:30 +02:00
2017-09-01 18:35:23 -07:00
2015-11-03 10:52:13 -05:00