Commit 3be28e93 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull rdma fixes from Jason Gunthorpe:
 "The last two weeks have been quiet here, just the usual smattering of
  long standing bug fixes.

  A collection of error case bug fixes:

   - Improper nesting of spinlock types in cm

   - Missing error codes and kfree()

   - Ensure dma_virt_ops users have the right kconfig symbols to work
     properly

   - Compilation failure of tools/testing"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  tools/testing/scatterlist: Fix test to compile and run
  IB/hfi1: Fix error return code in hfi1_init_dd()
  RMDA/sw: Don't allow drivers using dma_virt_ops on highmem configs
  RDMA/pvrdma: Fix missing kfree() in pvrdma_register_device()
  RDMA/cm: Make the local_id_table xarray non-irq
parents dda3f425 ee415d73
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -73,6 +73,9 @@ config INFINIBAND_ADDR_TRANS_CONFIGFS
	  This allows the user to config the default GID type that the CM
	  uses for each device, when initiaing new connections.

config INFINIBAND_VIRT_DMA
	def_bool !HIGHMEM

if INFINIBAND_USER_ACCESS || !INFINIBAND_USER_ACCESS
source "drivers/infiniband/hw/mthca/Kconfig"
source "drivers/infiniband/hw/qib/Kconfig"
+6 −6
Original line number Diff line number Diff line
@@ -859,7 +859,7 @@ static struct cm_id_private *cm_alloc_id_priv(struct ib_device *device,
	atomic_set(&cm_id_priv->work_count, -1);
	refcount_set(&cm_id_priv->refcount, 1);

	ret = xa_alloc_cyclic_irq(&cm.local_id_table, &id, NULL, xa_limit_32b,
	ret = xa_alloc_cyclic(&cm.local_id_table, &id, NULL, xa_limit_32b,
			      &cm.local_id_next, GFP_KERNEL);
	if (ret < 0)
		goto error;
@@ -878,8 +878,8 @@ error:
 */
static void cm_finalize_id(struct cm_id_private *cm_id_priv)
{
	xa_store_irq(&cm.local_id_table, cm_local_id(cm_id_priv->id.local_id),
		     cm_id_priv, GFP_KERNEL);
	xa_store(&cm.local_id_table, cm_local_id(cm_id_priv->id.local_id),
		 cm_id_priv, GFP_ATOMIC);
}

struct ib_cm_id *ib_create_cm_id(struct ib_device *device,
@@ -1169,7 +1169,7 @@ retest:
	spin_unlock(&cm.lock);
	spin_unlock_irq(&cm_id_priv->lock);

	xa_erase_irq(&cm.local_id_table, cm_local_id(cm_id->local_id));
	xa_erase(&cm.local_id_table, cm_local_id(cm_id->local_id));
	cm_deref_id(cm_id_priv);
	wait_for_completion(&cm_id_priv->comp);
	while ((work = cm_dequeue_work(cm_id_priv)) != NULL)
@@ -4482,7 +4482,7 @@ static int __init ib_cm_init(void)
	cm.remote_id_table = RB_ROOT;
	cm.remote_qp_table = RB_ROOT;
	cm.remote_sidr_table = RB_ROOT;
	xa_init_flags(&cm.local_id_table, XA_FLAGS_ALLOC | XA_FLAGS_LOCK_IRQ);
	xa_init_flags(&cm.local_id_table, XA_FLAGS_ALLOC);
	get_random_bytes(&cm.random_id_operand, sizeof cm.random_id_operand);
	INIT_LIST_HEAD(&cm.timewait_list);

+2 −1
Original line number Diff line number Diff line
@@ -15245,7 +15245,8 @@ int hfi1_init_dd(struct hfi1_devdata *dd)
		    & CCE_REVISION_SW_MASK);

	/* alloc netdev data */
	if (hfi1_netdev_alloc(dd))
	ret = hfi1_netdev_alloc(dd);
	if (ret)
		goto bail_cleanup;

	ret = set_up_context_variables(dd);
+1 −1
Original line number Diff line number Diff line
@@ -266,7 +266,7 @@ static int pvrdma_register_device(struct pvrdma_dev *dev)
	}
	ret = ib_device_set_netdev(&dev->ib_dev, dev->netdev, 1);
	if (ret)
		return ret;
		goto err_srq_free;
	spin_lock_init(&dev->srq_tbl_lock);
	rdma_set_device_sysfs_group(&dev->ib_dev, &pvrdma_attr_group);

+2 −1
Original line number Diff line number Diff line
# SPDX-License-Identifier: GPL-2.0-only
config INFINIBAND_RDMAVT
	tristate "RDMA verbs transport library"
	depends on X86_64 && ARCH_DMA_ADDR_T_64BIT
	depends on INFINIBAND_VIRT_DMA
	depends on X86_64
	depends on PCI
	select DMA_VIRT_OPS
	help
Loading