Patch "RDMA/irdma: Validate number of CQ entries on create CQ" has been added to the 5.14-stable tree

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

 



This is a note to let you know that I've just added the patch titled

    RDMA/irdma: Validate number of CQ entries on create CQ

to the 5.14-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     rdma-irdma-validate-number-of-cq-entries-on-create-c.patch
and it can be found in the queue-5.14 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit f143796a2a2bf976afe75090ff6d55b2b870d734
Author: Sindhu Devale <sindhu.devale@xxxxxxxxx>
Date:   Thu Sep 16 14:12:20 2021 -0500

    RDMA/irdma: Validate number of CQ entries on create CQ
    
    [ Upstream commit f4475f249445b3c1fb99919b0514a075b6d6b3d4 ]
    
    Add lower bound check for CQ entries at creation time.
    
    Fixes: b48c24c2d710 ("RDMA/irdma: Implement device supported verb APIs")
    Link: https://lore.kernel.org/r/20210916191222.824-3-shiraz.saleem@xxxxxxxxx
    Signed-off-by: Sindhu Devale <sindhu.devale@xxxxxxxxx>
    Signed-off-by: Shiraz Saleem <shiraz.saleem@xxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/irdma/verbs.c b/drivers/infiniband/hw/irdma/verbs.c
index 6107f37321d2..6c3d28f744cb 100644
--- a/drivers/infiniband/hw/irdma/verbs.c
+++ b/drivers/infiniband/hw/irdma/verbs.c
@@ -2040,7 +2040,7 @@ static int irdma_create_cq(struct ib_cq *ibcq,
 		/* Kmode allocations */
 		int rsize;
 
-		if (entries > rf->max_cqe) {
+		if (entries < 1 || entries > rf->max_cqe) {
 			err_code = -EINVAL;
 			goto cq_free_rsrc;
 		}



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux