diff options
author | Christian König <deathsimple@vodafone.de> | 2012-08-29 13:24:15 +0200 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2012-08-29 12:11:01 -0400 |
commit | f54b350d89bf16d31593b935bafccf510ff4a708 (patch) | |
tree | 3aae1d4b361b4ee54ba599c27956f739c88bd514 /drivers/gpu | |
parent | 4a2b6662c3632176b4fdf012243dd3751367bf1f (diff) | |
download | linux-f54b350d89bf16d31593b935bafccf510ff4a708.tar.gz linux-f54b350d89bf16d31593b935bafccf510ff4a708.tar.bz2 linux-f54b350d89bf16d31593b935bafccf510ff4a708.zip |
drm/radeon: fix double free in radeon_gpu_reset
radeon_ring_restore is freeing the memory for the saved
ring data. We need to remember that, otherwise we try to
restore the ring data again on the next try. Additional
to that it shouldn't try the reset infinitely if we have
saved ring data.
Signed-off-by: Christian König <deathsimple@vodafone.de>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_device.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_device.c b/drivers/gpu/drm/radeon/radeon_device.c index 33da8bff8942..7a3daebd732d 100644 --- a/drivers/gpu/drm/radeon/radeon_device.c +++ b/drivers/gpu/drm/radeon/radeon_device.c @@ -1346,12 +1346,15 @@ retry: for (i = 0; i < RADEON_NUM_RINGS; ++i) { radeon_ring_restore(rdev, &rdev->ring[i], ring_sizes[i], ring_data[i]); + ring_sizes[i] = 0; + ring_data[i] = NULL; } r = radeon_ib_ring_tests(rdev); if (r) { dev_err(rdev->dev, "ib ring test failed (%d).\n", r); if (saved) { + saved = false; radeon_suspend(rdev); goto retry; } |