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 jfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
file.c splice: Use filemap_splice_read() instead of generic_file_splice_read() 2023-05-24 08:42:17 -06:00
inode.c jfs: add check read-only before truncation in jfs_truncate_nolock() 2025-02-19 15:29:08 -06:00
ioctl.c jfs: convert to ctime accessor functions 2023-07-24 10:30:01 +02:00
jfs_acl.h
jfs_btree.h
jfs_debug.c
jfs_debug.h
jfs_dinode.h jfs: define xtree root and page independently 2023-10-13 10:39:25 -05:00
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 quota: Properly annotate i_dquot arrays with __rcu 2024-02-08 12:04:59 +01:00
jfs_inode.c jfs: convert to new timestamp accessors 2023-10-18 14:08:23 +02:00
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: port block device access to file 2024-02-25 12:05:26 +01:00
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: port block device access to file 2024-02-25 12:05:26 +01:00
jfs_superblock.h
jfs_txnmgr.c jfs: Add missing set_freezable() for freezable kthread 2024-01-02 11:06:52 -06:00
jfs_txnmgr.h
jfs_types.h
jfs_umount.c
jfs_unicode.c
jfs_unicode.h fs/jfs: Use common ucs2 upper case table 2023-08-30 08:55:52 -05:00
jfs_xattr.h jfs: move jfs_xattr_handlers to .rodata 2023-10-09 16:24:19 +02:00
jfs_xtree.c jfs: define xtree root and page independently 2023-10-13 10:39:25 -05:00
jfs_xtree.h jfs: define xtree root and page independently 2023-10-13 10:39:25 -05:00
Kconfig 22 smb3/cifs client fixes and two related changes (for unicode mapping) 2023-08-30 21:01:40 -07:00
Makefile fs/jfs: Use common ucs2 upper case table 2023-08-30 08:55:52 -05:00
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