[beignet] 07/12: Return error, don't crash, if /dev/dri/card0 inaccessible e.g. in chroots

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Wed Mar 18 21:37:46 UTC 2015


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository beignet.

commit 252cedcb1cecae7e7ffcc4ae1cd5d673dd03482c
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Wed Mar 18 13:19:38 2015 +0000

    Return error, don't crash, if /dev/dri/card0 inaccessible
    e.g. in chroots
---
 debian/changelog                                 |  1 +
 debian/patches/fail-gracefully-no-hardware.patch | 16 ++++++++++++++++
 debian/patches/series                            |  1 +
 3 files changed, 18 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index d77694b..5ec3865 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -13,6 +13,7 @@ beignet (1.0.2-1) UNRELEASED; urgency=medium
     old unsupported hardware.
   * Give a single helpful error message, not many confusing ones,
     on unsupported hardware.
+  * Fix crash if /dev/dri/card0 is inaccessible.
 
  -- Andreas Beckmann <anbe at debian.org>  Tue, 17 Mar 2015 23:29:43 +0100
 
diff --git a/debian/patches/fail-gracefully-no-hardware.patch b/debian/patches/fail-gracefully-no-hardware.patch
new file mode 100644
index 0000000..c5e4eea
--- /dev/null
+++ b/debian/patches/fail-gracefully-no-hardware.patch
@@ -0,0 +1,16 @@
+Description: Return error, don't crash, if /dev/dri/card0 inaccessible
+
+e.g. in chroots
+
+Author: Rebecca Palmer <rebecca_palmer at zoho.com>
+
+--- beignet-1.0.2.orig/src/x11/dricommon.c
++++ beignet-1.0.2/src/x11/dricommon.c
+@@ -284,7 +284,6 @@ getDRI2State(Display* dpy, int screen, c
+     goto err_out;
+ 
+   fd = open(device_name, O_RDWR);
+-  assert(fd >= 0);
+ 
+   if (fd < 0)
+     goto err_out;
diff --git a/debian/patches/series b/debian/patches/series
index 16bb4ea..97860fc 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@ Enable-test-debug.patch
 force-llvm-3.5.patch
 support-kfreebsd.patch
 reduce-notfound-output.patch
+fail-gracefully-no-hardware.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opencl/beignet.git



More information about the Pkg-opencl-commits mailing list