]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/commitdiff
fix up cxgb4 patch for 4.9 and 4.19
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 10:56:20 +0000 (11:56 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 29 Dec 2020 10:56:20 +0000 (11:56 +0100)
queue-4.19/rdma-cxgb4-validate-the-number-of-cqes.patch
queue-4.9/rdma-cxgb4-validate-the-number-of-cqes.patch

index f40f4d6fed1bfb7aeb8af8e1678544e3468545dd..81747bf9a4bf4a39caf46141b0d0e5253b820274 100644 (file)
@@ -16,23 +16,18 @@ Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
 Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/infiniband/hw/cxgb4/cq.c | 3 +++
+ drivers/infiniband/hw/cxgb4/cq.c |    3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
-index 1fd8798d91a73..beba761902449 100644
 --- a/drivers/infiniband/hw/cxgb4/cq.c
 +++ b/drivers/infiniband/hw/cxgb4/cq.c
-@@ -1012,6 +1012,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev,
+@@ -1012,6 +1012,9 @@ struct ib_cq *c4iw_create_cq(struct ib_d
  
        rhp = to_c4iw_dev(ibdev);
  
 +      if (entries < 1 || entries > ibdev->attrs.max_cqe)
-+              return -EINVAL;
++              return ERR_PTR(-EINVAL);
 +
        if (vector >= rhp->rdev.lldi.nciq)
                return ERR_PTR(-EINVAL);
  
--- 
-2.27.0
-
index 65a5841223834cc4d58b17704b05c4e44bd146a2..df9f194aa980bff10dbcbbf758253835a639ff4c 100644 (file)
@@ -16,23 +16,18 @@ Signed-off-by: Kamal Heib <kamalheib1@gmail.com>
 Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
 Signed-off-by: Sasha Levin <sashal@kernel.org>
 ---
- drivers/infiniband/hw/cxgb4/cq.c | 3 +++
+ drivers/infiniband/hw/cxgb4/cq.c |    3 +++
  1 file changed, 3 insertions(+)
 
-diff --git a/drivers/infiniband/hw/cxgb4/cq.c b/drivers/infiniband/hw/cxgb4/cq.c
-index a856371bbe58c..501f496f4e1a1 100644
 --- a/drivers/infiniband/hw/cxgb4/cq.c
 +++ b/drivers/infiniband/hw/cxgb4/cq.c
-@@ -893,6 +893,9 @@ struct ib_cq *c4iw_create_cq(struct ib_device *ibdev,
+@@ -893,6 +893,9 @@ struct ib_cq *c4iw_create_cq(struct ib_d
  
        rhp = to_c4iw_dev(ibdev);
  
 +      if (entries < 1 || entries > ibdev->attrs.max_cqe)
-+              return -EINVAL;
++              return ERR_PTR(-EINVAL);
 +
        if (vector >= rhp->rdev.lldi.nciq)
                return ERR_PTR(-EINVAL);
  
--- 
-2.27.0
-