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:Kenneth Lee <klee33@uw.edu> Reviewed-by:
Xiubo Li <xiubli@redhat.com> Signed-off-by:
Ilya Dryomov <idryomov@gmail.com> Stable-dep-of: 5bd76b8d ("ceph: fix NULL pointer dereference for req->r_session") Signed-off-by:
Sasha Levin <sashal@kernel.org> Signed-off-by:
sanglipeng <sanglipeng1@jd.com>
Loading
Please sign in to comment