Patch "erofs: release ztailpacking pclusters properly" has been added to the 6.5-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: release ztailpacking pclusters properly

to the 6.5-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-release-ztailpacking-pclusters-properly.patch
and it can be found in the queue-6.5 subdirectory.

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



commit 251d59af05a9fddd9b9068b88c5dcea44a0323e5
Author: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx>
Date:   Tue Aug 22 19:05:30 2023 +0800

    erofs: release ztailpacking pclusters properly
    
    [ Upstream commit 91b1ad0815fbb1095c8b9e8a2bf4201186afe304 ]
    
    Currently ztailpacking pclusters are chained with FOLLOWED_NOINPLACE and
    not recorded into the managed_pslots XArray.
    
    After commit 7674a42f35ea ("erofs: use struct lockref to replace
    handcrafted approach"), ztailpacking pclusters won't be freed with
    erofs_workgroup_put() anymore, which will cause the following issue:
    
    BUG erofs_pcluster-1 (Tainted: G           OE     ): Objects remaining in erofs_pcluster-1 on __kmem_cache_shutdown()
    
    Use z_erofs_free_pcluster() directly to free ztailpacking pclusters.
    
    Fixes: 7674a42f35ea ("erofs: use struct lockref to replace handcrafted approach")
    Signed-off-by: Jingbo Xu <jefflexu@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
    Reviewed-by: Chao Yu <chao@xxxxxxxxxx>
    Link: https://lore.kernel.org/r/20230822110530.96831-1-jefflexu@xxxxxxxxxxxxxxxxx
    Signed-off-by: Gao Xiang <hsiangkao@xxxxxxxxxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/fs/erofs/zdata.c b/fs/erofs/zdata.c
index 9c9350eb17040..9bfdb4ad7c763 100644
--- a/fs/erofs/zdata.c
+++ b/fs/erofs/zdata.c
@@ -1412,7 +1412,10 @@ static void z_erofs_decompress_queue(const struct z_erofs_decompressqueue *io,
 		owned = READ_ONCE(be.pcl->next);
 
 		z_erofs_decompress_pcluster(&be, io->eio ? -EIO : 0);
-		erofs_workgroup_put(&be.pcl->obj);
+		if (z_erofs_is_inline_pcluster(be.pcl))
+			z_erofs_free_pcluster(be.pcl);
+		else
+			erofs_workgroup_put(&be.pcl->obj);
 	}
 }
 



[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