This is a note to let you know that I've just added the patch titled
drm/radeon: prevent crash in the ring space allocation
to the 3.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
drm-radeon-prevent-crash-in-the-ring-space-allocation.patch
and it can be found in the queue-3.7 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <[email protected]> know about it.
>From fd5d93a0015ce1a7db881382022b2fcdfdc61760 Mon Sep 17 00:00:00 2001
From: Alex Deucher <[email protected]>
Date: Wed, 30 Jan 2013 14:24:09 -0500
Subject: drm/radeon: prevent crash in the ring space allocation
From: Alex Deucher <[email protected]>
commit fd5d93a0015ce1a7db881382022b2fcdfdc61760 upstream.
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 <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
drivers/gpu/drm/radeon/radeon_ring.c | 3 +++
1 file changed, 3 insertions(+)
--- a/drivers/gpu/drm/radeon/radeon_ring.c
+++ b/drivers/gpu/drm/radeon/radeon_ring.c
@@ -377,6 +377,9 @@ int radeon_ring_alloc(struct radeon_devi
{
int r;
+ /* make sure we aren't trying to allocate more space than there is on
the ring */
+ if (ndw > (ring->ring_size / 4))
+ return -ENOMEM;
/* Align requested size with padding so unlock_commit can
* pad safely */
ndw = (ndw + ring->align_mask) & ~ring->align_mask;
Patches currently in stable-queue which might be from [email protected]
are
queue-3.7/drm-radeon-fix-backend-map-setup-on-1-rb-sumo-boards.patch
queue-3.7/drm-radeon-protect-against-div-by-0-in-backend-setup.patch
queue-3.7/drm-radeon-fix-mc-blackout-on-evergreen.patch
queue-3.7/drm-radeon-add-quirk-for-rv100-board.patch
queue-3.7/drm-radeon-calling-object_unrefer-when-creating-fb-failure.patch
queue-3.7/drm-radeon-evergreen-wait-for-the-mc-to-settle-after-mc-blackout.patch
queue-3.7/drm-radeon-prevent-crash-in-the-ring-space-allocation.patch
queue-3.7/drm-radeon-add-wait_until-to-the-non-vm-safe-regs-list-for-cayman-tn.patch
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html