]> rtime.felk.cvut.cz Git - zynq/linux.git/commitdiff
Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
authorLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Jan 2019 02:20:51 +0000 (18:20 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sun, 6 Jan 2019 02:20:51 +0000 (18:20 -0800)
Pull rdma fixes from Jason Gunthorpe:
 "Over the break a few defects were found, so this is a -rc style pull
  request of various small things that have been posted.

   - An attempt to shorten RCU grace period driven delays showed crashes
     during heavier testing, and has been entirely reverted

   - A missed merge/rebase error between the advise_mr and ib_device_ops
     series

   - Some small static analysis driven fixes from Julia and Aditya

   - Missed ability to create a XRC_INI in the devx verbs interop
     series"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  infiniband/qedr: Potential null ptr dereference of qp
  infiniband: bnxt_re: qplib: Check the return value of send_message
  IB/ipoib: drop useless LIST_HEAD
  IB/core: Add advise_mr to the list of known ops
  Revert "IB/mlx5: Fix long EEH recover time with NVMe offloads"
  IB/mlx5: Allow XRC INI usage via verbs in DEVX context

drivers/infiniband/core/device.c
drivers/infiniband/hw/bnxt_re/qplib_sp.c
drivers/infiniband/hw/mlx5/mr.c
drivers/infiniband/hw/mlx5/qp.c
drivers/infiniband/hw/qedr/qedr_iw_cm.c
drivers/infiniband/ulp/ipoib/ipoib_ib.c

index 47ab34ee1a9d68ab07e242b1ea65347a43d2c163..8872453e26c07c65c12b2aca5f9f14a6924f91f7 100644 (file)
@@ -1232,6 +1232,7 @@ void ib_set_device_ops(struct ib_device *dev, const struct ib_device_ops *ops)
        } while (0)
 
        SET_DEVICE_OP(dev_ops, add_gid);
+       SET_DEVICE_OP(dev_ops, advise_mr);
        SET_DEVICE_OP(dev_ops, alloc_dm);
        SET_DEVICE_OP(dev_ops, alloc_fmr);
        SET_DEVICE_OP(dev_ops, alloc_hw_stats);
index be03b5738f71570bc932e3dc0149578ee9e9465f..efa0f2949dc740c9fbf1903b2ea26199b1a2e293 100644 (file)
@@ -780,9 +780,8 @@ int bnxt_qplib_map_tc2cos(struct bnxt_qplib_res *res, u16 *cids)
        req.cos0 = cpu_to_le16(cids[0]);
        req.cos1 = cpu_to_le16(cids[1]);
 
-       bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp, NULL,
-                                    0);
-       return 0;
+       return bnxt_qplib_rcfw_send_message(rcfw, (void *)&req, (void *)&resp,
+                                               NULL, 0);
 }
 
 int bnxt_qplib_get_roce_stats(struct bnxt_qplib_rcfw *rcfw,
index 1bd8c1b1dba1c52ff449e0bb42ceda78cef79f82..fd6ea1f75085ee0590a1eb0508689cba3d358e71 100644 (file)
@@ -73,8 +73,7 @@ static int destroy_mkey(struct mlx5_ib_dev *dev, struct mlx5_ib_mr *mr)
 
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
        /* Wait until all page fault handlers using the mr complete. */
-       if (mr->umem && mr->umem->is_odp)
-               synchronize_srcu(&dev->mr_srcu);
+       synchronize_srcu(&dev->mr_srcu);
 #endif
 
        return err;
@@ -238,9 +237,6 @@ static void remove_keys(struct mlx5_ib_dev *dev, int c, int num)
 {
        struct mlx5_mr_cache *cache = &dev->cache;
        struct mlx5_cache_ent *ent = &cache->ent[c];
-#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
-       bool odp_mkey_exist = false;
-#endif
        struct mlx5_ib_mr *tmp_mr;
        struct mlx5_ib_mr *mr;
        LIST_HEAD(del_list);
@@ -253,10 +249,6 @@ static void remove_keys(struct mlx5_ib_dev *dev, int c, int num)
                        break;
                }
                mr = list_first_entry(&ent->head, struct mlx5_ib_mr, list);
-#ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
-               if (mr->umem && mr->umem->is_odp)
-                       odp_mkey_exist = true;
-#endif
                list_move(&mr->list, &del_list);
                ent->cur--;
                ent->size--;
@@ -265,8 +257,7 @@ static void remove_keys(struct mlx5_ib_dev *dev, int c, int num)
        }
 
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
-       if (odp_mkey_exist)
-               synchronize_srcu(&dev->mr_srcu);
+       synchronize_srcu(&dev->mr_srcu);
 #endif
 
        list_for_each_entry_safe(mr, tmp_mr, &del_list, list) {
@@ -581,7 +572,6 @@ static void clean_keys(struct mlx5_ib_dev *dev, int c)
 {
        struct mlx5_mr_cache *cache = &dev->cache;
        struct mlx5_cache_ent *ent = &cache->ent[c];
-       bool odp_mkey_exist = false;
        struct mlx5_ib_mr *tmp_mr;
        struct mlx5_ib_mr *mr;
        LIST_HEAD(del_list);
@@ -594,8 +584,6 @@ static void clean_keys(struct mlx5_ib_dev *dev, int c)
                        break;
                }
                mr = list_first_entry(&ent->head, struct mlx5_ib_mr, list);
-               if (mr->umem && mr->umem->is_odp)
-                       odp_mkey_exist = true;
                list_move(&mr->list, &del_list);
                ent->cur--;
                ent->size--;
@@ -604,8 +592,7 @@ static void clean_keys(struct mlx5_ib_dev *dev, int c)
        }
 
 #ifdef CONFIG_INFINIBAND_ON_DEMAND_PAGING
-       if (odp_mkey_exist)
-               synchronize_srcu(&dev->mr_srcu);
+       synchronize_srcu(&dev->mr_srcu);
 #endif
 
        list_for_each_entry_safe(mr, tmp_mr, &del_list, list) {
index 9c94c1b9ec35da6bdcda4cfb430a8024aa17775c..dd2ae640bc848add5f316d2285b497347e6d69ea 100644 (file)
@@ -837,7 +837,8 @@ static int create_user_qp(struct mlx5_ib_dev *dev, struct ib_pd *pd,
                goto err_umem;
        }
 
-       uid = (attr->qp_type != IB_QPT_XRC_TGT) ? to_mpd(pd)->uid : 0;
+       uid = (attr->qp_type != IB_QPT_XRC_TGT &&
+              attr->qp_type != IB_QPT_XRC_INI) ? to_mpd(pd)->uid : 0;
        MLX5_SET(create_qp_in, *in, uid, uid);
        pas = (__be64 *)MLX5_ADDR_OF(create_qp_in, *in, pas);
        if (ubuffer->umem)
index 505fa36487629ce003b1ac78a2414efbe18e4195..93b16237b76774c986580792b7160cd7a9c85c3e 100644 (file)
@@ -492,6 +492,8 @@ int qedr_iw_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
        int i;
 
        qp = idr_find(&dev->qpidr.idr, conn_param->qpn);
+       if (unlikely(!qp))
+               return -EINVAL;
 
        laddr = (struct sockaddr_in *)&cm_id->m_local_addr;
        raddr = (struct sockaddr_in *)&cm_id->m_remote_addr;
index 6d35570092d67bbfd0814739126fc7a372085d42..78fa777c87b1997c0f7ab8629801338923070aea 100644 (file)
@@ -669,7 +669,6 @@ static void __ipoib_reap_ah(struct net_device *dev)
 {
        struct ipoib_dev_priv *priv = ipoib_priv(dev);
        struct ipoib_ah *ah, *tah;
-       LIST_HEAD(remove_list);
        unsigned long flags;
 
        netif_tx_lock_bh(dev);