* [PATCH rdma-next] RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP
@ 2020-07-27 9:58 Leon Romanovsky
2020-07-29 18:53 ` Jason Gunthorpe
0 siblings, 1 reply; 2+ messages in thread
From: Leon Romanovsky @ 2020-07-27 9:58 UTC (permalink / raw)
To: Doug Ledford, Jason Gunthorpe; +Cc: Mark Zhang, linux-rdma, Majd Dibbiny
From: Mark Zhang <markz@mellanox.com>
When dump QPs bound to a counter, raw QPs should be allowed to dump
without the CAP_NET_RAW privilege, which is consistent with what
"rdma res show qp" does.
Fixes: c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback")
Signed-off-by: Mark Zhang <markz@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
---
drivers/infiniband/core/nldev.c | 3 ---
1 file changed, 3 deletions(-)
diff --git a/drivers/infiniband/core/nldev.c b/drivers/infiniband/core/nldev.c
index 76af7ea2875d..12d29d54a081 100644
--- a/drivers/infiniband/core/nldev.c
+++ b/drivers/infiniband/core/nldev.c
@@ -759,9 +759,6 @@ static int fill_stat_counter_qps(struct sk_buff *msg,
xa_lock(&rt->xa);
xa_for_each(&rt->xa, id, res) {
qp = container_of(res, struct ib_qp, res);
- if (qp->qp_type == IB_QPT_RAW_PACKET && !capable(CAP_NET_RAW))
- continue;
-
if (!qp->counter || (qp->counter->id != counter->id))
continue;
--
2.26.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH rdma-next] RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP
2020-07-27 9:58 [PATCH rdma-next] RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP Leon Romanovsky
@ 2020-07-29 18:53 ` Jason Gunthorpe
0 siblings, 0 replies; 2+ messages in thread
From: Jason Gunthorpe @ 2020-07-29 18:53 UTC (permalink / raw)
To: Leon Romanovsky; +Cc: Doug Ledford, Mark Zhang, linux-rdma, Majd Dibbiny
On Mon, Jul 27, 2020 at 12:58:28PM +0300, Leon Romanovsky wrote:
> From: Mark Zhang <markz@mellanox.com>
>
> When dump QPs bound to a counter, raw QPs should be allowed to dump
> without the CAP_NET_RAW privilege, which is consistent with what
> "rdma res show qp" does.
>
> Fixes: c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback")
> Signed-off-by: Mark Zhang <markz@mellanox.com>
> Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
> ---
> drivers/infiniband/core/nldev.c | 3 ---
> 1 file changed, 3 deletions(-)
Applied to for-next, thanks
Jason
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-29 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-27 9:58 [PATCH rdma-next] RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP Leon Romanovsky
2020-07-29 18:53 ` Jason Gunthorpe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).