Commit 85705b18 authored by David Francis's avatar David Francis Committed by Alex Deucher
Browse files

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.

Reviewed-by: default avatarFelix Kuehling <felix.kuehling@amd.com>
Signed-off-by: default avatarDavid Francis <David.Francis@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 4d82724f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2571,8 +2571,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);