[PATCH] fs: erofs: xattr.c change kzalloc to kcalloc

Chao Yu chao at kernel.org
Thu Jan 16 18:42:43 AEDT 2025


On 12/23/24 11:32, Gao Xiang wrote:
> On 2024/12/23 11:00, Ethan Carter Edwards wrote:
>>  From 272d7ef4611e64269fada0ea3021eece590118b9 Mon Sep 17 00:00:00 2001
>> From: Ethan Carter Edwards <ethan at ethancedwards.com>
>> Date: Sun, 22 Dec 2024 21:23:56 -0500
>> Subject: [PATCH] fs: erofs: xattr.c change kzalloc to kcalloc
>>
>> Refactor xattr.c to use kcalloc instead of kzalloc when multiplying
>> allocation size by count. This refactor prevents unintentional
>> memory overflows. Discovered by checkpatch.pl.
>>
>> Signed-off-by: Ethan Carter Edwards <ethan at ethancedwards.com>
> 
> Reviewed-by: Gao Xiang <hsiangkao at linux.alibaba.com>

Reviewed-by: Chao Yu <chao at kernel.org>

Thanks,


More information about the Linux-erofs mailing list