Skip to content

Commit ba80013

Browse files
Maor Gottliebjgunthorpe
authored andcommitted
RDMA/mlx5: Block delay drop to unprivileged users
It has been discovered that this feature can globally block the RX port, so it should be allowed for highly privileged users only. Fixes: 03404e8("IB/mlx5: Add support to dropless RQ") Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Maor Gottlieb <[email protected]> Signed-off-by: Leon Romanovsky <[email protected]> Signed-off-by: Jason Gunthorpe <[email protected]>
1 parent 950bf4f commit ba80013

File tree

1 file changed

+4
-0
lines changed
  • drivers/infiniband/hw/mlx5

1 file changed

+4
-0
lines changed

drivers/infiniband/hw/mlx5/qp.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6205,6 +6205,10 @@ struct ib_wq *mlx5_ib_create_wq(struct ib_pd *pd,
62056205
if (udata->outlen && udata->outlen < min_resp_len)
62066206
return ERR_PTR(-EINVAL);
62076207

6208+
if (!capable(CAP_SYS_RAWIO) &&
6209+
init_attr->create_flags & IB_WQ_FLAGS_DELAY_DROP)
6210+
return ERR_PTR(-EPERM);
6211+
62086212
dev = to_mdev(pd->device);
62096213
switch (init_attr->wq_type) {
62106214
case IB_WQT_RQ:

0 commit comments

Comments
 (0)