- ib-ipath-dont-allow-resources-to-be-created-with.patch removed from -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled

     IB/ipath: don't allow resources to be created with illegal values

has been removed from the -mm tree.  Its filename is

     ib-ipath-dont-allow-resources-to-be-created-with.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: IB/ipath: don't allow resources to be created with illegal values
From: "Bryan O'Sullivan" <bos@xxxxxxxxxxxxx>

Signed-off-by: Robert Walsh <robert.walsh@xxxxxxxxxx>
Signed-off-by: Bryan O'Sullivan <bryan.osullivan@xxxxxxxxxx>
Cc: "Michael S. Tsirkin" <mst@xxxxxxxxxxxxxx>
Cc: Roland Dreier <rolandd@xxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxx>
---

 drivers/infiniband/hw/ipath/ipath_mr.c    |    5 +++++
 drivers/infiniband/hw/ipath/ipath_qp.c    |    8 ++++++++
 drivers/infiniband/hw/ipath/ipath_verbs.c |   11 +++++++++++
 3 files changed, 24 insertions(+)

diff -puN drivers/infiniband/hw/ipath/ipath_mr.c~ib-ipath-dont-allow-resources-to-be-created-with drivers/infiniband/hw/ipath/ipath_mr.c
--- a/drivers/infiniband/hw/ipath/ipath_mr.c~ib-ipath-dont-allow-resources-to-be-created-with
+++ a/drivers/infiniband/hw/ipath/ipath_mr.c
@@ -170,6 +170,11 @@ struct ib_mr *ipath_reg_user_mr(struct i
 	int n, m, i;
 	struct ib_mr *ret;
 
+	if (region->length == 0) {
+		ret = ERR_PTR(-EINVAL);
+		goto bail;
+	}
+
 	n = 0;
 	list_for_each_entry(chunk, &region->chunk_list, list)
 		n += chunk->nents;
diff -puN drivers/infiniband/hw/ipath/ipath_qp.c~ib-ipath-dont-allow-resources-to-be-created-with drivers/infiniband/hw/ipath/ipath_qp.c
--- a/drivers/infiniband/hw/ipath/ipath_qp.c~ib-ipath-dont-allow-resources-to-be-created-with
+++ a/drivers/infiniband/hw/ipath/ipath_qp.c
@@ -667,6 +667,14 @@ struct ib_qp *ipath_create_qp(struct ib_
 		goto bail;
 	}
 
+	if (init_attr->cap.max_send_sge +
+	    init_attr->cap.max_recv_sge +
+	    init_attr->cap.max_send_wr +
+	    init_attr->cap.max_recv_wr == 0) {
+		ret = ERR_PTR(-EINVAL);
+		goto bail;
+	}
+
 	switch (init_attr->qp_type) {
 	case IB_QPT_UC:
 	case IB_QPT_RC:
diff -puN drivers/infiniband/hw/ipath/ipath_verbs.c~ib-ipath-dont-allow-resources-to-be-created-with drivers/infiniband/hw/ipath/ipath_verbs.c
--- a/drivers/infiniband/hw/ipath/ipath_verbs.c~ib-ipath-dont-allow-resources-to-be-created-with
+++ a/drivers/infiniband/hw/ipath/ipath_verbs.c
@@ -792,6 +792,17 @@ static struct ib_ah *ipath_create_ah(str
 		goto bail;
 	}
 
+	if (ah_attr->dlid == 0) {
+		ret = ERR_PTR(-EINVAL);
+		goto bail;
+	}
+
+	if (ah_attr->port_num != 1 ||
+	    ah_attr->port_num > pd->device->phys_port_cnt) {
+		ret = ERR_PTR(-EINVAL);
+		goto bail;
+	}
+
 	ah = kmalloc(sizeof *ah, GFP_ATOMIC);
 	if (!ah) {
 		ret = ERR_PTR(-ENOMEM);
_

Patches currently in -mm which might be from bos@xxxxxxxxxxxxx are

origin.patch
ib-ipath-fixes-a-bug-where-our-delay-for-eeprom-no.patch

-
To unsubscribe from this list: send the line "unsubscribe mm-commits" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Kernel Newbies FAQ]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Photo]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux