[PATCH v8 3/3] drm/amdgpu: Allow kfd CRIU with no buffer objects
Yat Sin, David
David.YatSin at amd.com
Fri Jul 25 14:33:17 UTC 2025
[AMD Official Use Only - AMD Internal Distribution Only]
Acked-by: David Yat Sin <david.yatsin at amd.com>
> -----Original Message-----
> From: Francis, David <David.Francis at amd.com>
> Sent: Friday, July 18, 2025 10:48 AM
> To: dri-devel at lists.freedesktop.org
> Cc: tvrtko.ursulin at igalia.com; Kuehling, Felix <Felix.Kuehling at amd.com>; Yat Sin,
> David <David.YatSin at amd.com>; Freehill, Chris <Chris.Freehill at amd.com>;
> Koenig, Christian <Christian.Koenig at amd.com>; dcostantino at meta.com;
> sruffell at meta.com; simona at ffwll.ch; mripard at kernel.org; tzimmermann at suse.de;
> Francis, David <David.Francis at amd.com>
> Subject: [PATCH v8 3/3] drm/amdgpu: Allow kfd CRIU with no buffer objects
>
> The kfd CRIU checkpoint ioctl would return an error if trying to checkpoint a
> process with no kfd buffer objects.
>
> This is a normal case and should not be an error.
>
> Signed-off-by: David Francis <David.Francis at amd.com>
> ---
> drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> index 828a9ceef1e7..f7f34b710d3e 100644
> --- a/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> +++ b/drivers/gpu/drm/amd/amdkfd/kfd_chardev.c
> @@ -2566,8 +2566,8 @@ static int criu_restore(struct file *filep,
> pr_debug("CRIU restore (num_devices:%u num_bos:%u num_objects:%u
> priv_data_size:%llu)\n",
> args->num_devices, args->num_bos, args->num_objects, args-
> >priv_data_size);
>
> - if (!args->bos || !args->devices || !args->priv_data || !args->priv_data_size ||
> - !args->num_devices || !args->num_bos)
> + if ((args->num_bos > 0 && !args->bos) || !args->devices || !args->priv_data
> ||
> + !args->priv_data_size || !args->num_devices)
> return -EINVAL;
>
> mutex_lock(&p->mutex);
> --
> 2.34.1
More information about the dri-devel
mailing list