Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Christian König and committed by
Alex Deucher
f54b350d 4a2b6662

+3
+3
drivers/gpu/drm/radeon/radeon_device.c
··· 1346 1346 for (i = 0; i < RADEON_NUM_RINGS; ++i) { 1347 1347 radeon_ring_restore(rdev, &rdev->ring[i], 1348 1348 ring_sizes[i], ring_data[i]); 1349 + ring_sizes[i] = 0; 1350 + ring_data[i] = NULL; 1349 1351 } 1350 1352 1351 1353 r = radeon_ib_ring_tests(rdev); 1352 1354 if (r) { 1353 1355 dev_err(rdev->dev, "ib ring test failed (%d).\n", r); 1354 1356 if (saved) { 1357 + saved = false; 1355 1358 radeon_suspend(rdev); 1356 1359 goto retry; 1357 1360 }