]> git.baikalelectronics.ru Git - kernel.git/commit
drm/radeon: prevent crash in the ring space allocation
authorAlex Deucher <alexander.deucher@amd.com>
Wed, 30 Jan 2013 19:24:09 +0000 (14:24 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 31 Jan 2013 21:14:16 +0000 (16:14 -0500)
commit4546cea4c604e608ea1d847fee33208b32f5d70f
treed968a404e96f5bb09cf83b5d54ebcc4ce53cff41
parent1171866fbf9c9b46c05456d53a7934959444daed
drm/radeon: prevent crash in the ring space allocation

If the requested number of DWs on the ring is larger than
the size of the ring itself, return an error.

In testing with large VM updates, we've seen crashes when we
try and allocate more space on the ring than the total size
of the ring without checking.

This prevents the crash but for large VM updates or bo moves
of very large buffers, we will need to break the transaction
down into multiple batches.  I have patches to use IBs for
the next kernel.

Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/radeon/radeon_ring.c