History

Merge tag 'ext4_for_linus-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4

Pull ext4 fixes from Ted Ts'o: - Fix an inconsistency in structure size on 32-bit platforms caused by padding differences for the new EXT4_IOC_[GS]ET_TUNE_SB_PARAM ioctls - Fix a buffer leak on the error path when dropping the refcount an xattr value stored in an inode - Fix missing locking on the error path for the file defragmentation ioctl leading to a BUG * tag 'ext4_for_linus-6.19-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix iloc.bh leak in ext4_xattr_inode_update_ref ext4: add missing down_write_data_sem in mext_move_extent(). ext4: fix ext4_tune_sb_params padding

Linus Torvalds committed 10 months ago

Commit f8907392 parents e90b81e d250bdf3 files · +4 −1Browse files

Unified · Split

3 files
  1. fs/ext4/move_extent.c +2 −0
  2. fs/ext4/xattr.c +1 −0
  3. include/uapi/linux/ext4.h +1 −1
fs/ext4/move_extent.c+2−0
@@ -393,9 +393,11 @@ out: · 392 unmodified lines
393 393
394repair_branches:394repair_branches:
395 ret2 = 0;395 ret2 = 0;
396 ext4_double_down_write_data_sem(orig_inode, donor_inode);
396 r_len = ext4_swap_extents(handle, donor_inode, orig_inode,397 r_len = ext4_swap_extents(handle, donor_inode, orig_inode,
397 mext->donor_lblk, orig_map->m_lblk,398 mext->donor_lblk, orig_map->m_lblk,
398 *m_len, 0, &ret2);399 *m_len, 0, &ret2);
400 ext4_double_up_write_data_sem(orig_inode, donor_inode);
399 if (ret2 || r_len != *m_len) {401 if (ret2 || r_len != *m_len) {
400 ext4_error_inode_block(orig_inode, (sector_t)(orig_map->m_lblk),402 ext4_error_inode_block(orig_inode, (sector_t)(orig_map->m_lblk),
401 EIO, "Unable to copy data block, data will be lost!");403 EIO, "Unable to copy data block, data will be lost!");
fs/ext4/xattr.c+1−0
@@ -1037,6 +1037,7 @@ static int ext4_xattr_inode_update_ref(handle_t *handle, struct inode *ea_inode, · 1036 unmodified lines
1037 ext4_error_inode(ea_inode, __func__, __LINE__, 0,1037 ext4_error_inode(ea_inode, __func__, __LINE__, 0,
1038 "EA inode %lu ref wraparound: ref_count=%lld ref_change=%d",1038 "EA inode %lu ref wraparound: ref_count=%lld ref_change=%d",
1039 ea_inode->i_ino, ref_count, ref_change);1039 ea_inode->i_ino, ref_count, ref_change);
1040 brelse(iloc.bh);
1040 ret = -EFSCORRUPTED;1041 ret = -EFSCORRUPTED;
1041 goto out;1042 goto out;
1042 }1043 }
include/uapi/linux/ext4.h+1−1
@@ -139,7 +139,7 @@ struct ext4_tune_sb_params { · 138 unmodified lines
139 __u32 clear_feature_incompat_mask;139 __u32 clear_feature_incompat_mask;
140 __u32 clear_feature_ro_compat_mask;140 __u32 clear_feature_ro_compat_mask;
141 __u8 mount_opts[64];141 __u8 mount_opts[64];
142 __u8 pad[64];142 __u8 pad[68];
143};143};
144 144
145#define EXT4_TUNE_FL_ERRORS_BEHAVIOR 0x00000001145#define EXT4_TUNE_FL_ERRORS_BEHAVIOR 0x00000001