[PATCH v3 0/2] ubifs: Fix two kmemleaks in error path
Zhihao Cheng
chengzhihao1 at huawei.com
Sun Jan 7 18:41:03 PST 2024
First memleak is found by mounting corrupted UBIFS image with chk_index
enabled.
Second memleak is found by powercut testing for encryption scenario.
v1->v2:
ubifs_symlink: Call fscrypt_free_inode() directly in error handling path.
Add 'Cc: stable at vger.kernel.org' and 'Suggested-by' tags in patch 2.
v2->v3:
Handle tnc releasing in error handling path in dbg_check_idx_size().
Zhihao Cheng (2):
ubifs: dbg_check_idx_size: Fix kmemleak if loading znode failed
ubifs: ubifs_symlink: Fix memleak of inode->i_link in error path
fs/ubifs/debug.c | 9 +++++++--
fs/ubifs/dir.c | 2 ++
fs/ubifs/tnc.c | 9 +--------
fs/ubifs/tnc_misc.c | 22 ++++++++++++++++++++++
fs/ubifs/ubifs.h | 1 +
5 files changed, 33 insertions(+), 10 deletions(-)
--
2.39.2
More information about the linux-mtd
mailing list