diff options
| author | Yang Erkun <yangerkun@huawei.com> | 2025-12-13 13:57:06 +0800 |
|---|---|---|
| committer | Theodore Ts'o <tytso@mit.edu> | 2026-01-18 11:23:10 -0500 |
| commit | d250bdf531d9cd4096fedbb9f172bb2ca660c868 (patch) | |
| tree | b519bab20676bb50059aaf56bd164e17e936fd06 | |
| parent | 0ef7ef422730b8585214a2825735838d664ce1be (diff) | |
ext4: fix iloc.bh leak in ext4_xattr_inode_update_ref
The error branch for ext4_xattr_inode_update_ref forget to release the
refcount for iloc.bh. Find this when review code.
Fixes: 57295e835408 ("ext4: guard against EA inode refcount underflow in xattr update")
Signed-off-by: Yang Erkun <yangerkun@huawei.com>
Reviewed-by: Baokun Li <libaokun1@huawei.com>
Reviewed-by: Zhang Yi <yi.zhang@huawei.com>
Link: https://patch.msgid.link/20251213055706.3417529-1-yangerkun@huawei.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
| -rw-r--r-- | fs/ext4/xattr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/ext4/xattr.c b/fs/ext4/xattr.c index 2e02efbddaac..4ed8ddf2a60b 100644 --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -1037,6 +1037,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode, ext4_error_inode(ea_inode, __func__, __LINE__, 0, "EA inode %lu ref wraparound: ref_count=%lld ref_change=%d", ea_inode->i_ino, ref_count, ref_change); + brelse(iloc.bh); ret = -EFSCORRUPTED; goto out; } |
