Commit 1f2f72ef authored by Kenneth Lee's avatar Kenneth Lee Committed by sanglipeng
Browse files

ceph: Use kcalloc for allocating multiple elements

stable inclusion
from stable-v5.10.157
commit 00c004c070f22a47063de4ff2a5638fce1f94d95
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I7MU59

Reference: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=00c004c070f22a47063de4ff2a5638fce1f94d95



--------------------------------

[ Upstream commit aa1d6272 ]

Prefer using kcalloc(a, b) over kzalloc(a * b) as this improves
semantics since kcalloc is intended for allocating an array of memory.

Signed-off-by: default avatarKenneth Lee <klee33@uw.edu>
Reviewed-by: default avatarXiubo Li <xiubli@redhat.com>
Signed-off-by: default avatarIlya Dryomov <idryomov@gmail.com>
Stable-dep-of: 5bd76b8d ("ceph: fix NULL pointer dereference for req->r_session")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
Signed-off-by: default avatarsanglipeng <sanglipeng1@jd.com>
parent 60dfdf31
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment