Netlink dumpit handshake exchanges the index from which kernel should
start to return its value, in current code, this index included
not-visible in this PID items too and indirectly revealed the number of
entries.
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
* objects.
*/
xa_for_each(&rt->xa, id, res) {
- if (idx < start)
- goto next;
-
if (!is_visible_in_pid_ns(res))
- goto next;
+ continue;
- if (!rdma_restrack_get(res))
+ if (idx < start || !rdma_restrack_get(res))
goto next;
xa_unlock(&rt->xa);