RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP
PATCH 1/1 RDMA/netlink: Remove CAP_NET_RAW check when dump a raw QP
From: Mark Zhang <[email protected]>
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 <[email protected]>
Signed-off-by Leon Romanovsky <[email protected]>
--- drivers/infiniband/core/nldev.c | 3 --- 1 file changed, 3 deletions(-)
drivers/infiniband/core/nldev.c +0 -3
@@ -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 ;
Signature · 1 line
2.26.2
Quoted 6 lines · Leon Romanovsky
From: Mark Zhang <[email protected]>
When dump QPs bound to a counter, raw QPs should be allowed to dump without the
CAP_NET_RAWprivilege, which is consistent with what "rdma res show qp" does.
Quoted 6 lines
Fixes c4ffee7c9bdb ("RDMA/netlink: Implement counter dumpit calback")Signed-off-by Mark Zhang <[email protected]>Signed-off-by Leon Romanovsky <[email protected]>--- drivers/infiniband/core/nldev.c | 3 --- 1 file changed, 3 deletions(-)
Applied to for-next, thanks
Jason