ext4: allocate extended attribute value in vmalloc area
authorYe Bin <yebin10@huawei.com>
Thu, 8 Dec 2022 02:32:31 +0000 (10:32 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:12:02 +0000 (11:12 +0100)
commitf06a3cff1b4e4b1b5edfd5031aa58e679064db01
tree28ab6ff0e90f2214caa7c6ff6605d0c7996415f8
parent56ecd5509fdc76af2b70a9090af15829c21d04b2
ext4: allocate extended attribute value in vmalloc area

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@huawei.com>
Reviewed-by: Jan Kara <jack@suse.cz>
Link: https://lore.kernel.org/r/20221208023233.1231330-3-yebin@huaweicloud.com
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/xattr.c