]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
RDMA/mlx5: Remove DCT restrack tracking
authorPatrisious Haddad <phaddad@nvidia.com>
Sun, 7 Jun 2026 18:18:08 +0000 (21:18 +0300)
committerJason Gunthorpe <jgg@nvidia.com>
Thu, 11 Jun 2026 19:06:41 +0000 (16:06 -0300)
DCT restrack tracking wasn't working to begin with as it was only
tracking the first DCT which was added, since at creation the DCT number
isn't yet initialized because the DCT FW object is only created during
modify. The following DCT additions were failing silently.

Since the fix isn't trivial and there were no users that required or
complained about this issue we are dropping this for now instead of fixing.

Fixes: fd3af5e21866 ("RDMA/mlx5: Track DCT, DCI and REG_UMR QPs as diver_detail resources.")
Link: https://patch.msgid.link/r/20260607-restrack-uaf-fix-v1-1-d72e45eb76c2@nvidia.com
Signed-off-by: Patrisious Haddad <phaddad@nvidia.com>
Reviewed-by: Michael Guralnik <michaelgur@nvidia.com>
Signed-off-by: Edward Srouji <edwards@nvidia.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/mlx5/restrack.c

index 0725d1161c40d605b658eb383b1f8c4b2d0e2fb7..a9575219cdd14e7674f3e439ccbb60f5e02309bf 100644 (file)
@@ -3146,6 +3146,7 @@ static int create_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
 
        switch (qp->type) {
        case MLX5_IB_QPT_DCT:
+               rdma_restrack_no_track(&qp->ibqp.res);
                err = create_dct(dev, pd, qp, params);
                break;
        case MLX5_IB_QPT_DCI:
index 67841922c7b8770c86fb5a47588e09560d0004f5..00a9bcb2603f0b094bcef8a4ffe6564699a85769 100644 (file)
@@ -178,9 +178,6 @@ static int fill_res_qp_entry(struct sk_buff *msg, struct ib_qp *ibqp)
                ret = nla_put_string(msg, RDMA_NLDEV_ATTR_RES_SUBTYPE,
                                     "REG_UMR");
                break;
-       case MLX5_IB_QPT_DCT:
-               ret = nla_put_string(msg, RDMA_NLDEV_ATTR_RES_SUBTYPE, "DCT");
-               break;
        case MLX5_IB_QPT_DCI:
                ret = nla_put_string(msg, RDMA_NLDEV_ATTR_RES_SUBTYPE, "DCI");
                break;