File U_vmware-vmwgfx-Don-t-add-pixmaps-to-the-pixmap-list-if-they-re-already-on-it.patch of Package xf86-video-vmware.1727

From: Thomas Hellstrom <thellstrom@vmware.com>
Date: Wed Sep 3 07:08:41 2014 -0700
Subject: [PATCH]vmware/vmwgfx: Don't add pixmaps to the pixmap list if they're already on it
Patch-mainline: xf86-video-vmware-13.1.0
Git-commit: 32562129750077a23f26f2e69adc8403eb24bf3f
Git-repo: git://anongit.freedesktop.org/git/xorg/driver/xf86-video-vmware
References: boo#959200
Signed-off-by: Egbert Eich <eich@suse.com>

This could cause loops through the list to spin indefinitely.
This would most likely occur at VT switches.

Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Jakob Bornecrantz <jakob@vmware.com>
---
 vmwgfx/vmwgfx_saa.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/vmwgfx/vmwgfx_saa.c b/vmwgfx/vmwgfx_saa.c
index b9204c6..bca3d93 100644
--- a/vmwgfx/vmwgfx_saa.c
+++ b/vmwgfx/vmwgfx_saa.c
@@ -694,7 +694,8 @@ vmwgfx_modify_pixmap_header (PixmapPtr pixmap, int w, int h, int depth,
 
     vmwgfx_pix_resize(pixmap, old_pitch, old_height, old_width);
     vmwgfx_pixmap_free_storage(vpix);
-    WSBMLISTADDTAIL(&vpix->pixmap_list, &vsaa->pixmaps);
+    if (WSBMLISTEMPTY(&vpix->pixmap_list))
+	WSBMLISTADDTAIL(&vpix->pixmap_list, &vsaa->pixmaps);
 
     return TRUE;
 
openSUSE Build Service is sponsored by