diff options
author | Leon Romanovsky | 2019-02-18 22:25:52 +0200 |
---|---|---|
committer | Jason Gunthorpe | 2019-02-19 10:13:39 -0700 |
commit | f2a0e45f36b0a210ff2388ed5fa89f81019c07a1 (patch) | |
tree | d87419721c0a2156b4295b267eab57d0c42f1239 /drivers/infiniband/core | |
parent | 1b8b778864b338b2e295687733d785ae1a65a9ea (diff) |
RDMA/nldev: Don't expose number of not-visible entries
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>
Diffstat (limited to 'drivers/infiniband/core')
-rw-r--r-- | drivers/infiniband/core/nldev.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c index 8b4f86ce50ce..e7350d9d60e9 100644 --- a/drivers/infiniband/core/nldev.c +++ b/drivers/infiniband/core/nldev.c @@ -1123,13 +1123,10 @@ static int res_get_common_dumpit(struct sk_buff *skb, * 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); |