Files
linux/fs
Zheng Yu a0f354f026 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 12:16:49 +02:00
..
2025-06-19 15:41:05 +02:00
2025-06-27 11:13:16 +01:00
2025-03-25 15:57:58 +01:00
2025-07-06 11:04:19 +02:00
2025-08-15 12:16:14 +02:00
2024-12-03 10:40:36 +01:00
2025-05-21 09:34:29 +02:00
2025-07-10 16:08:26 +02:00
2024-12-09 11:34:29 +01:00
2024-12-17 09:16:11 +01:00
2025-06-27 11:12:57 +01:00
2025-07-10 16:08:26 +02:00
2025-02-21 10:32:47 +01:00
2025-07-10 16:08:26 +02:00
2025-06-27 11:12:57 +01:00
2025-05-09 18:06:27 -04:00
2024-11-03 01:28:07 -05:00
2024-11-03 01:28:06 -05:00
2024-11-03 01:28:06 -05:00
2025-06-27 11:13:30 +01:00