Patch "erofs: fix potential return value overflow of z_erofs_shrink_scan()" has been added to the 6.12-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

    erofs: fix potential return value overflow of z_erofs_shrink_scan()

to the 6.12-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:
     erofs-fix-potential-return-value-overflow-of-z_erofs.patch
and it can be found in the queue-6.12 subdirectory.

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



commit 81fdce82147348f21c5996481b4e9d1825535aea
Author: Gao Xiang <xiang@xxxxxxxxxx>
Date:   Tue Jan 14 12:00:58 2025 +0800

    erofs: fix potential return value overflow of z_erofs_shrink_scan()
    
    [ Upstream commit db902986dee453bfb5835cbc8efa67154ab34caf ]
    
    z_erofs_shrink_scan() could return small numbers due to the mistyped
    `freed`.
    
    Although I don't think it has any visible impact.
    
    Fixes: 3883a79abd02 ("staging: erofs: introduce VLE decompression support")
    Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
    Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20250114040058.459981-1-hsiangkao@xxxxxxxxxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 6be6146b67d9c..a8fb4b525f544 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -923,8 +923,7 @@ unsigned long z_erofs_shrink_scan(struct erofs_sb_info *sbi,
 				  unsigned long nr_shrink)
 {
 	struct z_erofs_pcluster *pcl;
-	unsigned int freed = 0;
-	unsigned long index;
+	unsigned long index, freed = 0;
 
 	xa_lock(&sbi->managed_pslots);
 	xa_for_each(&sbi->managed_pslots, index, pcl) {




[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