summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Hellstrom <thellstrom@vmware.com>2014-09-03 07:08:41 -0700
committerThomas Hellstrom <thellstrom@vmware.com>2014-09-03 07:27:53 -0700
commit32562129750077a23f26f2e69adc8403eb24bf3f (patch)
tree3ac55313b0c2efc529f103181f713fa0f0290664
parent8b6316a312689d83ca8f8de939698bc137206f58 (diff)
vmware/vmwgfx: Don't add pixmaps to the pixmap list if they're already on it
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>
-rw-r--r--vmwgfx/vmwgfx_saa.c3
1 files changed, 2 insertions, 1 deletions
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;