Skip to content

drm/radeon: Fix memory allocation failures in command stream parser. (fdo #23993)

Pauli Nieminen dri-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2drm: Add generic multipart buffer.drivers/gpu/drm/Makefile drivers/gpu/drm/drm_buffer.c include/drm/drm_buffer.h+333 -12 replies
2/2drm/radeon: Fix memory allocation failures in the preKMS command stream checking.drivers/gpu/drm/radeon/r300_cmdbuf.c drivers/gpu/drm/radeon/radeon_drv.h drivers/gpu/drm/radeon/radeon_state.c+262 -2470 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] drm/radeon: Fix memory allocation failures in command stream parser. (fdo #23993)

Fixing kernel memory allocation bugs in radeon command stream parser requires splitting the buffer to multiple independ pages.

To make splitting one large array to multiple pages first patch adds drm_buffer structure and functions to reference data in the buffer.

Second patch converts existing parsing code to use drm_buffer to hold the command stream.

There is 2 beta tester reporting that patch works with their r300 based systems. I have tested the patch with r200 card.

After posting patch to the bug report I have cleaned the code from errors that checkpatch.pl reported.

 drivers/gpu/drm/Makefile              |    2 +-
 drivers/gpu/drm/drm_buffer.c          |  184 +++++++++++++++++++++
 drivers/gpu/drm/radeon/r300_cmdbuf.c  |  280 +++++++++++++++------------------
 drivers/gpu/drm/radeon/radeon_drv.h   |   32 ++++-
 drivers/gpu/drm/radeon/radeon_state.c |  197 ++++++++++++-----------
 include/drm/drm_buffer.h              |  148 +++++++++++++++++
 6 files changed, 595 insertions(+), 248 deletions(-)

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation Stay online with enterprise data centers and the best network in the business Choose flexible plans and management services without long-term contracts Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
--