drm/amdkfd: Fix criu_restore_bo error handling
authorFelix Kuehling <Felix.Kuehling@amd.com>
Fri, 18 Feb 2022 22:25:23 +0000 (17:25 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 22 Feb 2022 19:40:44 +0000 (14:40 -0500)
commit22804e03f7a5ed35d86721d037bbf52fbfd0369f
treee02bb4f01e595df54f4172678d2110974b7eea8f
parent757f9e4dd51644729d27c9b5e56f75681e8f17d0
drm/amdkfd: Fix criu_restore_bo error handling

Clang static analysis reports this problem
kfd_chardev.c:2327:2: warning: 1st function call argument
  is an uninitialized value
  kvfree(bo_privs);
  ^~~~~~~~~~~~~~~~

Make sure bo_buckets and bo_privs are initialized so freeing them in the
error handling code path will never result in undefined behaviour.

Fixes: 73fa13b6a511 ("drm/amdkfd: CRIU Implement KFD restore ioctl")
Reported-by: Tom Rix <trix@redhat.com>
Signed-off-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_chardev.c