xf86-video-intel: src/sna/kgem.c

Chris Wilson ickle at kemper.freedesktop.org
Thu Nov 6 04:43:27 PST 2014


 src/sna/kgem.c |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

New commits:
commit 33764685cbcd01548b6a23c217c7b511c1639694
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Nov 6 12:40:20 2014 +0000

    sna: Wrap prefaulting with sigtrap()
    
    Handle a potential SIGBUS due to kernel bugs when prefaulting the
    scanout surface.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=85959
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 7c572cc..9047437 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4629,7 +4629,10 @@ static void __kgem_bo_make_scanout(struct kgem *kgem,
 	if (bo->map__gtt == NULL)
 		bo->map__gtt = __kgem_bo_map__gtt(kgem, bo);
 	if (bo->map__gtt) {
-		*(uint32_t *)bo->map__gtt = 0;
+		if (sigtrap_get() == 0) {
+			*(uint32_t *)bo->map__gtt = 0;
+			sigtrap_put();
+		}
 		bo->domain = DOMAIN_GTT;
 	}
 


More information about the xorg-commit mailing list