Patch "ceph: fix incorrect kmalloc size of pagevec mempool" has been added to the 5.10-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

    ceph: fix incorrect kmalloc size of pagevec mempool

to the 5.10-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:
     ceph-fix-incorrect-kmalloc-size-of-pagevec-mempool.patch
and it can be found in the queue-5.10 subdirectory.

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



commit 1fed4f2057be7e4c2ccc264e50290c5a2ab05f85
Author: ethanwu <ethanwu@xxxxxxxxxxxx>
Date:   Thu Jul 11 14:47:56 2024 +0800

    ceph: fix incorrect kmalloc size of pagevec mempool
    
    [ Upstream commit 03230edb0bd831662a7c08b6fef66b2a9a817774 ]
    
    The kmalloc size of pagevec mempool is incorrectly calculated.
    It misses the size of page pointer and only accounts the number for the array.
    
    Fixes: a0102bda5bc0 ("ceph: move sb->wb_pagevec_pool to be a global mempool")
    Signed-off-by: ethanwu <ethanwu@xxxxxxxxxxxx>
    Reviewed-by: Xiubo Li <xiubli@xxxxxxxxxx>
    Signed-off-by: Ilya Dryomov <idryomov@xxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/ceph/super.c b/fs/ceph/super.c
index f2aff97348bc9..4e09d8e066473 100644
--- a/fs/ceph/super.c
+++ b/fs/ceph/super.c
@@ -783,7 +783,8 @@ static int __init init_caches(void)
 	if (!ceph_mds_request_cachep)
 		goto bad_mds_req;
 
-	ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10, CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT);
+	ceph_wb_pagevec_pool = mempool_create_kmalloc_pool(10,
+	    (CEPH_MAX_WRITE_SIZE >> PAGE_SHIFT) * sizeof(struct page *));
 	if (!ceph_wb_pagevec_pool)
 		goto bad_pagevec_pool;
 




[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