From: "Kuehling, Felix" <felix.kuehling@amd.com>
To: William Theesfeld <william@theesfeld.net>
Cc: Alex Deucher <alexander.deucher@amd.com>,
Christian König <christian.koenig@amd.com>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] drm/amdkfd: convert CRIU event-private allocation to kvcalloc()
Date: Wed, 3 Jun 2026 12:16:20 -0400 [thread overview]
Message-ID: <19398b47-c197-4404-9465-d7113dd528c2@amd.com> (raw)
In-Reply-To: <20260601195510.639318-1-william@theesfeld.net>
On 2026-06-01 15:55, William Theesfeld wrote:
> [You don't often get email from william@theesfeld.net. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
>
> criu_checkpoint_events() allocates the ev_privs[] array, sized by the
> runtime count returned from kfd_get_num_events(), using the open-coded
> kvzalloc(n * sizeof(*p), ...) form. Switch to kvcalloc(), which
> carries the same zero-on-allocation semantics and adds the standard
> size_mul overflow check on the n * sizeof multiplication.
>
> No functional change.
>
> Signed-off-by: William Theesfeld <william@theesfeld.net>
Reviewed-by: Felix Kuehling <felix.kuehling@amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_events.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_events.c b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> index 44150a71f..9739214e2 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_events.c
> @@ -543,7 +543,7 @@ int kfd_criu_checkpoint_events(struct kfd_process *p,
> if (!num_events)
> return 0;
>
> - ev_privs = kvzalloc(num_events * sizeof(*ev_privs), GFP_KERNEL);
> + ev_privs = kvcalloc(num_events, sizeof(*ev_privs), GFP_KERNEL);
> if (!ev_privs)
> return -ENOMEM;
>
> --
> 2.54.0
>
next prev parent reply other threads:[~2026-06-03 16:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-01 19:55 [PATCH] drm/amdkfd: convert CRIU event-private allocation to kvcalloc() William Theesfeld
2026-06-03 16:16 ` Kuehling, Felix [this message]
2026-06-04 3:42 ` Claude review: " Claude Code Review Bot
2026-06-04 3:42 ` Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=19398b47-c197-4404-9465-d7113dd528c2@amd.com \
--to=felix.kuehling@amd.com \
--cc=airlied@gmail.com \
--cc=alexander.deucher@amd.com \
--cc=amd-gfx@lists.freedesktop.org \
--cc=christian.koenig@amd.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=simona@ffwll.ch \
--cc=william@theesfeld.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox