diff options
author | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2024-02-21 16:30:17 +0300 |
---|---|---|
committer | Maarten Lankhorst <maarten.lankhorst@linux.intel.com> | 2024-02-21 22:08:20 +0300 |
commit | bd71cdd209c63f3d526aef661282b5252a436c4d (patch) | |
tree | ebd7ad3ec7cb4e219b4a7c29920218e2d634d23e /drivers/gpu/drm/xe | |
parent | 8491b0ef3233a94901d6f28d203c5ebb2f0f0b33 (diff) | |
download | linux-bd71cdd209c63f3d526aef661282b5252a436c4d.tar.xz |
drm/xe: Clear all snapshot members after deleting coredump
It's not strictly needed to clear right now, but this prevents bugs
from dangling pointers.
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: Francois Dugast <francois.dugast@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20240221133024.898315-2-maarten.lankhorst@linux.intel.com
Diffstat (limited to 'drivers/gpu/drm/xe')
-rw-r--r-- | drivers/gpu/drm/xe/xe_devcoredump.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/drm/xe/xe_devcoredump.c b/drivers/gpu/drm/xe/xe_devcoredump.c index 08d3f6cb7229..ae26d8c6d01c 100644 --- a/drivers/gpu/drm/xe/xe_devcoredump.c +++ b/drivers/gpu/drm/xe/xe_devcoredump.c @@ -124,6 +124,8 @@ static void xe_devcoredump_free(void *data) if (coredump->snapshot.hwe[i]) xe_hw_engine_snapshot_free(coredump->snapshot.hwe[i]); + /* To prevent stale data on next snapshot, clear everything */ + memset(&coredump->snapshot, 0, sizeof(coredump->snapshot)); coredump->captured = false; drm_info(&coredump_to_xe(coredump)->drm, "Xe device coredump has been deleted.\n"); |