Patch "RDMA/hns: Replace kfree() with kvfree()" has been added to the 5.15-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/hns: Replace kfree() with kvfree()

to the 5.15-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-hns-replace-kfree-with-kvfree.patch
and it can be found in the queue-5.15 subdirectory.

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



commit 108ac57dcbbdd1dd953ff6b442fff1986749f251
Author: Jiacheng Shi <billsjc@xxxxxxxxxxx>
Date:   Fri Dec 10 01:42:34 2021 -0800

    RDMA/hns: Replace kfree() with kvfree()
    
    [ Upstream commit 12d3bbdd6bd2780b71cc466f3fbc6eb7d43bbc2a ]
    
    Variables allocated by kvmalloc_array() should not be freed by kfree.
    Because they may be allocated by vmalloc.  So we replace kfree() with
    kvfree() here.
    
    Fixes: 6fd610c5733d ("RDMA/hns: Support 0 hop addressing for SRQ buffer")
    Link: https://lore.kernel.org/r/20211210094234.5829-1-billsjc@xxxxxxxxxxx
    Signed-off-by: Jiacheng Shi <billsjc@xxxxxxxxxxx>
    Acked-by: Wenpeng Liang <liangwenpeng@xxxxxxxxxx>
    Signed-off-by: Jason Gunthorpe <jgg@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/infiniband/hw/hns/hns_roce_srq.c b/drivers/infiniband/hw/hns/hns_roce_srq.c
index 6eee9deadd122..e64ef6903fb4f 100644
--- a/drivers/infiniband/hw/hns/hns_roce_srq.c
+++ b/drivers/infiniband/hw/hns/hns_roce_srq.c
@@ -259,7 +259,7 @@ static int alloc_srq_wrid(struct hns_roce_dev *hr_dev, struct hns_roce_srq *srq)
 
 static void free_srq_wrid(struct hns_roce_srq *srq)
 {
-	kfree(srq->wrid);
+	kvfree(srq->wrid);
 	srq->wrid = NULL;
 }
 



[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