linux-yocto/fs/jfs
Zheng Yu daec64f523 jfs: fix metapage reference count leak in dbAllocCtl
[ Upstream commit 856db37592 ]

In dbAllocCtl(), read_metapage() increases the reference count of the
metapage. However, when dp->tree.budmin < 0, the function returns -EIO
without calling release_metapage() to decrease the reference count,
leading to a memory leak.

Add release_metapage(mp) before the error return to properly manage
the metapage reference count and prevent the leak.

Fixes: a5f5e4698f ("jfs: fix shift-out-of-bounds in dbSplit")

Signed-off-by: Zheng Yu <zheng.yu@northwestern.edu>
Signed-off-by: Dave Kleikamp <dave.kleikamp@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-08-15 16:39:13 +02:00
..
acl.c
file.c
inode.c jfs: add check read-only before truncation in jfs_truncate_nolock() 2025-02-19 15:29:08 -06:00
ioctl.c
jfs_acl.h
jfs_btree.h
jfs_debug.c
jfs_debug.h
jfs_dinode.h
jfs_discard.c jfs: Fix null-ptr-deref in jfs_ioc_trim 2025-04-03 09:11:42 -05:00
jfs_discard.h
jfs_dmap.c jfs: fix metapage reference count leak in dbAllocCtl 2025-08-15 16:39:13 +02:00
jfs_dmap.h
jfs_dtree.c jfs: fix array-index-out-of-bounds read in add_missing_indices 2025-04-03 09:11:43 -05:00
jfs_dtree.h
jfs_extent.c jfs: add check read-only before txBeginAnon() call 2025-02-19 15:28:49 -06:00
jfs_extent.h
jfs_filsys.h jfs: convert jfs to use the new mount api 2024-10-08 14:41:53 +02:00
jfs_imap.c jfs: Prevent copying of nlink with value 0 from disk inode 2025-02-20 09:56:40 -06:00
jfs_imap.h
jfs_incore.h
jfs_inode.c
jfs_inode.h
jfs_lock.h
jfs_logmgr.c jfs: Change metapage->page to metapage->folio 2024-05-27 20:37:06 -05:00
jfs_logmgr.h
jfs_metapage.c jfs: implement migrate_folio for jfs_metapage_aops 2025-05-12 23:50:47 -07:00
jfs_metapage.h jfs: Change metapage->page to metapage->folio 2024-05-27 20:37:06 -05:00
jfs_mount.c
jfs_superblock.h
jfs_txnmgr.c
jfs_txnmgr.h
jfs_types.h
jfs_umount.c
jfs_unicode.c
jfs_unicode.h
jfs_xattr.h
jfs_xtree.c
jfs_xtree.h
Kconfig
Makefile
namei.c Change inode_operations.mkdir to return struct dentry * 2025-02-27 20:00:17 +01:00
resize.c
super.c jfs: Remove reference to bh->b_page 2025-02-13 12:29:02 -06:00
symlink.c
xattr.c jfs: fix slab-out-of-bounds read in ea_get() 2025-02-19 16:20:14 -06:00