[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

xserver-xorg-video-intel: Changes to 'debian-unstable'



 debian/changelog |    9 +++++++++
 uxa/uxa-render.c |   37 +++++++++++++++++++++----------------
 2 files changed, 30 insertions(+), 16 deletions(-)

New commits:
commit 15da5957bd59f02b871ad52203f0075e08a4813c
Author: Cyril Brulebois <kibi@debian.org>
Date:   Thu Feb 17 23:20:24 2011 +0100

    Document the cherry-pick (Closes: #613830).

diff --git a/debian/changelog b/debian/changelog
index 17a955a..b1bc602 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+xserver-xorg-video-intel (2:2.14.0-4) UNRELEASED; urgency=low
+
+  * Cherry-pick from upstream:
+    - uxa: Fallback if the temporary is too large
+  * This fixes a null pointer dereference with some rendering operations
+    involving large pictures (Closes: #613830). Thanks, Enrico!
+
+ -- Cyril Brulebois <kibi@debian.org>  Thu, 17 Feb 2011 23:12:05 +0100
+
 xserver-xorg-video-intel (2:2.14.0-3) unstable; urgency=low
 
   * Switch to dh:

commit 4f08ede8515023f64b907e4a9013008fb1a5815b
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Feb 17 16:48:24 2011 +0000

    uxa: Fallback if the temporary is too large
    
    If the render operation requires a temporary source Picture and the
    operation is large, larger than the maximum permitted bo, then we will
    fail to allocate the bo. In this case, we need to fallback and perform
    the operation on the CPU rather than dereference a NULL bo.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=34399
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
    (cherry picked from commit 4c66b28870b050493ad96f7b0fe2d70d7ee539c7)

diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c
index 02bfa03..6bffa4d 100644
--- a/uxa/uxa-render.c
+++ b/uxa/uxa-render.c
@@ -460,12 +460,12 @@ uxa_try_driver_solid_fill(PicturePtr pSrc,
 }
 
 static PicturePtr
-uxa_picture_for_pixman_format(ScreenPtr pScreen,
+uxa_picture_for_pixman_format(ScreenPtr screen,
 			      pixman_format_code_t format,
 			      int width, int height)
 {
-	PicturePtr pPicture;
-	PixmapPtr pPixmap;
+	PicturePtr picture;
+	PixmapPtr pixmap;
 	int error;
 
 	if (format == PIXMAN_a1)
@@ -475,24 +475,29 @@ uxa_picture_for_pixman_format(ScreenPtr pScreen,
 	if (PIXMAN_FORMAT_A(format) == 0)
 	    format = PIXMAN_a8r8g8b8;
 
-	pPixmap = (*pScreen->CreatePixmap)(pScreen, width, height,
-					   PIXMAN_FORMAT_DEPTH(format),
-					   UXA_CREATE_PIXMAP_FOR_MAP);
-	if (!pPixmap)
+	pixmap = screen->CreatePixmap(screen, width, height,
+					PIXMAN_FORMAT_DEPTH(format),
+					UXA_CREATE_PIXMAP_FOR_MAP);
+	if (!pixmap)
 		return 0;
 
-	pPicture = CreatePicture(0, &pPixmap->drawable,
-				 PictureMatchFormat(pScreen,
-						    PIXMAN_FORMAT_DEPTH(format),
-						    format),
-				 0, 0, serverClient, &error);
-	(*pScreen->DestroyPixmap) (pPixmap);
-	if (!pPicture)
+	if (!uxa_pixmap_is_offscreen(pixmap)) {
+		screen->DestroyPixmap(pixmap);
+		return 0;
+	}
+
+	picture = CreatePicture(0, &pixmap->drawable,
+				PictureMatchFormat(screen,
+						   PIXMAN_FORMAT_DEPTH(format),
+						   format),
+				0, 0, serverClient, &error);
+	screen->DestroyPixmap(pixmap);
+	if (!picture)
 		return 0;
 
-	ValidatePicture(pPicture);
+	ValidatePicture(picture);
 
-	return pPicture;
+	return picture;
 }
 
 static PicturePtr


Reply to: