]> git.baikalelectronics.ru Git - kernel.git/commit
erofs: fix memory leak of LZMA global compressed deduplication
authorGao Xiang <hsiangkao@linux.alibaba.com>
Thu, 7 Sep 2023 05:05:42 +0000 (13:05 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 20:00:39 +0000 (22:00 +0200)
commit6a5a8f0a9740f865693d5aa97a42cc4504538e18
tree2b443b22468b668e2e3ac8904d1668cc5ec32528
parent91aeb418b9175d09fc858f0fdf01988cbf990c5d
erofs: fix memory leak of LZMA global compressed deduplication

[ Upstream commit 75a5221630fe5aa3fedba7a06be618db0f79ba1e ]

When stressing microLZMA EROFS images with the new global compressed
deduplication feature enabled (`-Ededupe`), I found some short-lived
temporary pages weren't properly released, which could slowly cause
unexpected OOMs hours later.

Let's fix it now (LZ4 and DEFLATE don't have this issue.)

Fixes: 5c2a64252c5d ("erofs: introduce partial-referenced pclusters")
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20230907050542.97152-1-hsiangkao@linux.alibaba.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/erofs/decompressor_lzma.c