Skip to content
Commit 6c206b20 authored by Paolo Abeni's avatar Paolo Abeni Committed by David S. Miller
Browse files

udp: fix rx queue len reported by diag and proc interface



After commit 6b229cf7 ("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 0d4a6608 ("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: default avatar <trevor.francis@46labs.com>
Fixes: 6b229cf7 ("UDP: add batching to udp_rmem_release()")
Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 49c2c3f2
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment