mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-17 16:47:50 +00:00
plugins/amdgpu: Fix drm pages size header
Size needs to be initialized before opening the file for write, otherwise garbage is written into the file. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> Reviewed-By: David Francis <David.Francis@amd.com>
This commit is contained in:
parent
c0002ed839
commit
b1281444a8
1 changed files with 1 additions and 0 deletions
|
|
@ -414,6 +414,7 @@ int amdgpu_plugin_drm_dump_file(int fd, int id, struct stat *drm)
|
|||
}
|
||||
|
||||
snprintf(img_path, sizeof(img_path), IMG_DRM_PAGES_FILE, rd->id, rd->drm_render_minor, i);
|
||||
image_size = handle_entry.size;
|
||||
bo_contents_fp = open_img_file(img_path, true, &image_size, true);
|
||||
if (!bo_contents_fp) {
|
||||
ret = -errno;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue