From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 106CF33DB for ; Thu, 16 Jan 2025 07:42:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737013367; cv=none; b=LquE51cayhIVZzO/1vIhJmHA5nc+eKrpsj1lfXLQgl0VasSOSpiv919KjOPHyCsaHdRTle0sIggsxqW4DFPft+rvb+hdfNfPvIwT3t5vMjztCYWjR4kGsu8Z/FlGYylGJdBoMOPeHjhgJa5pyFzVsVIn886cq/hU4ph0JwkFRMA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1737013367; c=relaxed/simple; bh=lRWjx8TTBq3j1b0dqYw6XU1Qf2hUI2cm6gKE/V+ksXc=; h=Message-ID:Date:MIME-Version:Cc:Subject:To:References:From: In-Reply-To:Content-Type; b=cFJyR6MDHshsiAurGrT+AXv2GCiFRMJKOikt69zfeRIt9zhnrGWS7FoKDPB8leBVYbApFtUeiV5Ztrqck3ckxkm7JX6s8ExLTHvJsS++Bevk9ttq/n0Qw/99Q0MSfwfHFzuLM8jYvMsuEq6iDXfw+2RhHSYL0Wu3P2zVWLNww6w= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=WD9abJob; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="WD9abJob" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 432DDC4CED6; Thu, 16 Jan 2025 07:42:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1737013366; bh=lRWjx8TTBq3j1b0dqYw6XU1Qf2hUI2cm6gKE/V+ksXc=; h=Date:Cc:Subject:To:References:From:In-Reply-To:From; b=WD9abJobS93VRFIUEp/HKe/p4V+/x2M5KXMcJuFfb7VlAdvg564Z1DpSKNSDUnjkz vMM8XJDh+FRRKxp3osIQpw2vooqp26w3x5fQDEfe+SQ6Qcwol/yM/VyoXaZWtQXvam mcSQPXyOrqVNijlBgAGBNvN6WALCbPpCUZ6x+2ABQmlJmh+2+UOkd0CaN60U/sH1ef bUF0iL0tgITOAH31+MaXX5v1R4mQf9n3zR9HS7iBAwSYwHNfsh10TaSyDpfkGGSDp2 jmMCqBUjgXmcobbpx7XwdEjIeytSjNsH3IbJnY5S+R1HLWIdBYgOmKc2rtrAak/J4X 2XEDcEahS7APQ== Message-ID: Date: Thu, 16 Jan 2025 15:42:43 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Cc: chao@kernel.org, "linux-erofs@lists.ozlabs.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] fs: erofs: xattr.c change kzalloc to kcalloc To: Gao Xiang , Ethan Carter Edwards , "xiang@kernel.org" References: <80a3e6ab-839e-47b6-9554-fbaf330ab4b8@linux.alibaba.com> Content-Language: en-US From: Chao Yu In-Reply-To: <80a3e6ab-839e-47b6-9554-fbaf330ab4b8@linux.alibaba.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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 >> 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 > > Reviewed-by: Gao Xiang Reviewed-by: Chao Yu Thanks,