Commit 9420e8ad authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull rdma fixes from Jason Gunthorpe:
 "A small set of late-rc patches, mostly fixes for various crashers,
  some syzkaller fixes and a mlx5 HW limitation:

   - Several MAINTAINERS updates

   - Memory leak regression in ODP

   - Several fixes for syzkaller related crashes. Google recently taught
     syzkaller to create the software RDMA devices

   - Crash fixes for HFI1

   - Several fixes for mlx5 crashes

   - Prevent unprivileged access to an unsafe mlx5 HW resource"

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma:
  RDMA/mlx5: Block delay drop to unprivileged users
  RDMA/mlx5: Fix access to wrong pointer while performing flush due to error
  RDMA/core: Ensure security pkey modify is not lost
  MAINTAINERS: Clean RXE section and add Zhu as RXE maintainer
  IB/hfi1: Ensure pq is not left on waitlist
  IB/rdmavt: Free kernel completion queue when done
  RDMA/mad: Do not crash if the rdma device does not have a umad interface
  RDMA/core: Fix missing error check on dev_set_name()
  RDMA/nl: Do not permit empty devices names during RDMA_NLDEV_CMD_NEWLINK/SET
  RDMA/mlx5: Fix the number of hwcounters of a dynamic counter
  MAINTAINERS: Update maintainers for HISILICON ROCE DRIVER
  RDMA/odp: Fix leaking the tgid for implicit ODP
parents 1b649e0b ba80013f
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -7579,7 +7579,8 @@ F: Documentation/admin-guide/perf/hisi-pmu.rst
HISILICON ROCE DRIVER
M:	Lijun Ou <oulijun@huawei.com>
M:	Wei Hu(Xavier) <xavier.huwei@huawei.com>
M:	Wei Hu(Xavier) <huwei87@hisilicon.com>
M:	Weihang Li <liweihang@huawei.com>
L:	linux-rdma@vger.kernel.org
S:	Maintained
F:	drivers/infiniband/hw/hns/
@@ -15421,11 +15422,9 @@ F: drivers/infiniband/sw/siw/
F:	include/uapi/rdma/siw-abi.h
SOFT-ROCE DRIVER (rxe)
M:	Moni Shoua <monis@mellanox.com>
M:	Zhu Yanjun <yanjunz@mellanox.com>
L:	linux-rdma@vger.kernel.org
S:	Supported
W:	https://github.com/SoftRoCE/rxe-dev/wiki/rxe-dev:-Home
Q:	http://patchwork.kernel.org/project/linux-rdma/list/
F:	drivers/infiniband/sw/rxe/
F:	include/uapi/rdma/rdma_user_rxe.h
+3 −1
Original line number Diff line number Diff line
@@ -896,7 +896,9 @@ static int add_one_compat_dev(struct ib_device *device,
	cdev->dev.parent = device->dev.parent;
	rdma_init_coredev(cdev, device, read_pnet(&rnet->net));
	cdev->dev.release = compatdev_release;
	dev_set_name(&cdev->dev, "%s", dev_name(&device->dev));
	ret = dev_set_name(&cdev->dev, "%s", dev_name(&device->dev));
	if (ret)
		goto add_err;

	ret = device_add(&cdev->dev);
	if (ret)
+5 −1
Original line number Diff line number Diff line
@@ -918,6 +918,10 @@ static int nldev_set_doit(struct sk_buff *skb, struct nlmsghdr *nlh,

		nla_strlcpy(name, tb[RDMA_NLDEV_ATTR_DEV_NAME],
			    IB_DEVICE_NAME_MAX);
		if (strlen(name) == 0) {
			err = -EINVAL;
			goto done;
		}
		err = ib_device_rename(device, name);
		goto done;
	}
@@ -1514,7 +1518,7 @@ static int nldev_newlink(struct sk_buff *skb, struct nlmsghdr *nlh,

	nla_strlcpy(ibdev_name, tb[RDMA_NLDEV_ATTR_DEV_NAME],
		    sizeof(ibdev_name));
	if (strchr(ibdev_name, '%'))
	if (strchr(ibdev_name, '%') || strlen(ibdev_name) == 0)
		return -EINVAL;

	nla_strlcpy(type, tb[RDMA_NLDEV_ATTR_LINK_TYPE], sizeof(type));
+3 −8
Original line number Diff line number Diff line
@@ -349,16 +349,11 @@ static struct ib_ports_pkeys *get_new_pps(const struct ib_qp *qp,
	else if (qp_pps)
		new_pps->main.pkey_index = qp_pps->main.pkey_index;

	if ((qp_attr_mask & IB_QP_PKEY_INDEX) && (qp_attr_mask & IB_QP_PORT))
	if (((qp_attr_mask & IB_QP_PKEY_INDEX) &&
	     (qp_attr_mask & IB_QP_PORT)) ||
	    (qp_pps && qp_pps->main.state != IB_PORT_PKEY_NOT_VALID))
		new_pps->main.state = IB_PORT_PKEY_VALID;

	if (!(qp_attr_mask & (IB_QP_PKEY_INDEX | IB_QP_PORT)) && qp_pps) {
		new_pps->main.port_num = qp_pps->main.port_num;
		new_pps->main.pkey_index = qp_pps->main.pkey_index;
		if (qp_pps->main.state != IB_PORT_PKEY_NOT_VALID)
			new_pps->main.state = IB_PORT_PKEY_VALID;
	}

	if (qp_attr_mask & IB_QP_ALT_PATH) {
		new_pps->alt.port_num = qp_attr->alt_port_num;
		new_pps->alt.pkey_index = qp_attr->alt_pkey_index;
+1 −1
Original line number Diff line number Diff line
@@ -275,8 +275,8 @@ void ib_umem_odp_release(struct ib_umem_odp *umem_odp)
		mmu_interval_notifier_remove(&umem_odp->notifier);
		kvfree(umem_odp->dma_list);
		kvfree(umem_odp->page_list);
		put_pid(umem_odp->tgid);
	}
	put_pid(umem_odp->tgid);
	kfree(umem_odp);
}
EXPORT_SYMBOL(ib_umem_odp_release);
Loading