This is a note to let you know that I've just added the patch titled ext4: allocate extended attribute value in vmalloc area to the 5.15-stable tree which can be found at: http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary The filename of the patch is: ext4-allocate-extended-attribute-value-in-vmalloc-area.patch and it can be found in the queue-5.15 subdirectory. If you, or anyone else, feels it should not be added to the stable tree, please let <stable@xxxxxxxxxxxxxxx> know about it. >From cc12a6f25e07ed05d5825a1664b67a970842b2ca Mon Sep 17 00:00:00 2001 From: Ye Bin <yebin10@xxxxxxxxxx> Date: Thu, 8 Dec 2022 10:32:31 +0800 Subject: ext4: allocate extended attribute value in vmalloc area From: Ye Bin <yebin10@xxxxxxxxxx> commit cc12a6f25e07ed05d5825a1664b67a970842b2ca upstream. Now, extended attribute value maximum length is 64K. The memory requested here does not need continuous physical addresses, so it is appropriate to use kvmalloc to request memory. At the same time, it can also cope with the situation that the extended attribute will become longer in the future. Signed-off-by: Ye Bin <yebin10@xxxxxxxxxx> Reviewed-by: Jan Kara <jack@xxxxxxx> Link: https://lore.kernel.org/r/20221208023233.1231330-3-yebin@xxxxxxxxxxxxxxx Signed-off-by: Theodore Ts'o <tytso@xxxxxxx> Cc: stable@xxxxxxxxxx Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx> --- fs/ext4/xattr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) --- a/fs/ext4/xattr.c +++ b/fs/ext4/xattr.c @@ -2549,7 +2549,7 @@ static int ext4_xattr_move_to_block(hand is = kzalloc(sizeof(struct ext4_xattr_ibody_find), GFP_NOFS); bs = kzalloc(sizeof(struct ext4_xattr_block_find), GFP_NOFS); - buffer = kmalloc(value_size, GFP_NOFS); + buffer = kvmalloc(value_size, GFP_NOFS); b_entry_name = kmalloc(entry->e_name_len + 1, GFP_NOFS); if (!is || !bs || !buffer || !b_entry_name) { error = -ENOMEM; @@ -2601,7 +2601,7 @@ static int ext4_xattr_move_to_block(hand error = 0; out: kfree(b_entry_name); - kfree(buffer); + kvfree(buffer); if (is) brelse(is->iloc.bh); if (bs) Patches currently in stable-queue which might be from yebin10@xxxxxxxxxx are queue-5.15/ext4-fix-inode-leak-in-ext4_xattr_inode_create-on-an-error-path.patch queue-5.15/ext4-fix-kernel-bug-in-ext4_write_inline_data_end.patch queue-5.15/ext4-allocate-extended-attribute-value-in-vmalloc-area.patch queue-5.15/ext4-fix-uninititialized-value-in-ext4_evict_inode.patch queue-5.15/ext4-fix-reserved-cluster-accounting-in-__es_remove_extent.patch queue-5.15/ext4-init-quota-for-old.inode-in-ext4_rename.patch