From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c Date: Sun, 15 Dec 2013 16:05:50 +0000 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1779791282==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EED6FA4F6 for ; Sun, 15 Dec 2013 08:05:50 -0800 (PST) List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1779791282== Content-Type: multipart/alternative; boundary="1387123550.a33bbf0.31677"; charset="us-ascii" --1387123550.a33bbf0.31677 Date: Sun, 15 Dec 2013 16:05:50 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=72732 Priority: medium Bug ID: 72732 Assignee: dri-devel@lists.freedesktop.org Summary: Missing NULL check; radeon_drm_winsys.c Severity: normal Classification: Unclassified OS: All Reporter: freedesktop@treblig.org Hardware: Other Status: NEW Version: unspecified Component: Drivers/DRI/R600 Product: Mesa I can sometime trigger a seg in do_winsys_init at radeon_drm_winsys.c on my HD4350 There seems to be a simple missing NULL check: 214 version = drmGetVersion(ws->fd); 215 if (version->version_major != 2 || 216 version->version_minor < 3) { All the other users of drmGetVersion do a NULL check, so I suggest adding: if (!version) { fprintf(stderr,"%s: drmGetVersion NULL - bad fd (%d)?\n", __FUNCTION__, ws->fd); return FALSE; } I believe this to be part of the reason for: https://bugzilla.redhat.com/show_bug.cgi?id=993463 why drmGetVersion is failing is a different matter (probably a bad fd at that point - but why?) , but at least the NULL check would stop the seg. Dave -- You are receiving this mail because: You are the assignee for the bug. --1387123550.a33bbf0.31677 Date: Sun, 15 Dec 2013 16:05:50 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"
Priority medium
Bug ID 72732
Assignee dri-devel@lists.freedesktop.org
Summary Missing NULL check; radeon_drm_winsys.c
Severity normal
Classification Unclassified
OS All
Reporter freedesktop@treblig.org
Hardware Other
Status NEW
Version unspecified
Component Drivers/DRI/R600
Product Mesa

I can sometime trigger a seg in do_winsys_init at radeon_drm_winsys.c on my
HD4350

There seems to be a simple missing NULL check:


214    version = drmGetVersion(ws->fd);
215    if (version->version_major != 2 ||
216        version->version_minor < 3) {

All the other users of drmGetVersion do a NULL check, so I suggest adding:

    if (!version) {
      fprintf(stderr,"%s: drmGetVersion NULL - bad fd (%d)?\n", __FUNCTION__,
ws->fd);
      return FALSE;
    }

I believe this to be part of the reason for:
https://bugzilla.redhat.com/show_bug.cgi?id=993463


why drmGetVersion is failing is a different matter (probably a bad fd at that
point - but why?) , but at least the NULL check would stop the seg.

Dave


You are receiving this mail because:
  • You are the assignee for the bug.
--1387123550.a33bbf0.31677-- --===============1779791282== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1779791282==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 72732] Missing NULL check; radeon_drm_winsys.c Date: Wed, 01 Jan 2014 01:26:19 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1052318071==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 9614EFACD1 for ; Tue, 31 Dec 2013 17:26:18 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1052318071== Content-Type: multipart/alternative; boundary="1388539578.fCfc0.16219"; charset="us-ascii" --1388539578.fCfc0.16219 Date: Wed, 1 Jan 2014 01:26:18 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=72732 --- Comment #1 from Dave Gilbert --- OK, I believe the case that's causing it to go down this route is a perms screw up somewhere; I was running this test in a separate X session (just logging as a normal user on the console and running X :2 ) But with a bit of debug I'm seeing: libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so libGL error: failed to open drm device: Permission denied libGL error: failed to load driver: r600 [dg@major ~]$ ls -lZ /dev/dri/card0 crw-rw----+ root video system_u:object_r:dri_device_t:s0 /dev/dri/card0 [dg@major ~]$ id -Z unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 So I'm not quite sure what the perm screw up is, but that's separate - this will seg in glxgears or anything if the drm device won't open. Dave -- You are receiving this mail because: You are the assignee for the bug. --1388539578.fCfc0.16219 Date: Wed, 1 Jan 2014 01:26:18 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 1 on bug 72732 from
OK, I believe the case that's causing it to go down this route is a perms screw
up somewhere; I was running this test in a separate X session (just logging as
a normal user on the console and running X :2 )

But with a bit of debug I'm seeing:

libGL: OpenDriver: trying /usr/lib64/dri/tls/r600_dri.so
libGL: OpenDriver: trying /usr/lib64/dri/r600_dri.so
libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r600

[dg@major ~]$ ls -lZ /dev/dri/card0
crw-rw----+ root video system_u:object_r:dri_device_t:s0 /dev/dri/card0
[dg@major ~]$ id -Z
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

So I'm not quite sure what the perm screw up is, but that's separate - this
will seg in glxgears or anything if the drm device won't open.

Dave


You are receiving this mail because:
  • You are the assignee for the bug.
--1388539578.fCfc0.16219-- --===============1052318071== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1052318071==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 72732] Missing NULL check; radeon_drm_winsys.c Date: Wed, 01 Jan 2014 14:43:45 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0088928406==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id BC7DEFA471 for ; Wed, 1 Jan 2014 06:43:44 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0088928406== Content-Type: multipart/alternative; boundary="1388587424.666E00.32325"; charset="us-ascii" --1388587424.666E00.32325 Date: Wed, 1 Jan 2014 14:43:44 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=72732 --- Comment #2 from Dave Gilbert --- and now understand the perm problem; I was running X :2 from vt 2, it was starting X visible on vt 3, when I changed to vt3 it removed the acl on /dev/dri/card0 so that it lost the perms when clients ran (although the server still had it open). So still say it's missing that NULL check. -- You are receiving this mail because: You are the assignee for the bug. --1388587424.666E00.32325 Date: Wed, 1 Jan 2014 14:43:44 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8"

Comment # 2 on bug 72732 from
and now understand the perm problem; I was running 

X :2 


  from vt 2, it was starting X visible on vt 3, when I changed to vt3 it
removed the acl on /dev/dri/card0 so that it lost the perms when clients ran
(although the server still had it open).

So still say it's missing that NULL check.


You are receiving this mail because:
  • You are the assignee for the bug.
--1388587424.666E00.32325-- --===============0088928406== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============0088928406==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 72732] Missing NULL check; radeon_drm_winsys.c Date: Sat, 08 Feb 2014 21:09:26 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1343379181==" Return-path: Received: from culpepper.freedesktop.org (unknown [131.252.210.165]) by gabe.freedesktop.org (Postfix) with ESMTP id 23F7BFA537 for ; Sat, 8 Feb 2014 13:09:26 -0800 (PST) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1343379181== Content-Type: multipart/alternative; boundary="1391893765.a4ceB1.7203"; charset="us-ascii" --1391893765.a4ceB1.7203 Date: Sat, 8 Feb 2014 21:09:25 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" https://bugs.freedesktop.org/show_bug.cgi?id=72732 Andreas Boll changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Drivers/DRI/R600 |Drivers/Gallium/r600 -- You are receiving this mail because: You are the assignee for the bug. --1391893765.a4ceB1.7203 Date: Sat, 8 Feb 2014 21:09:25 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" changed bug 72732
What Removed Added
Component Drivers/DRI/R600 Drivers/Gallium/r600


You are receiving this mail because:
  • You are the assignee for the bug.
--1391893765.a4ceB1.7203-- --===============1343379181== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/dri-devel --===============1343379181==-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: bugzilla-daemon@freedesktop.org Subject: [Bug 72732] Missing NULL check; radeon_drm_winsys.c Date: Wed, 18 Sep 2019 19:12:08 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1760488399==" Return-path: Received: from culpepper.freedesktop.org (culpepper.freedesktop.org [IPv6:2610:10:20:722:a800:ff:fe98:4b55]) by gabe.freedesktop.org (Postfix) with ESMTP id 767066F9CC for ; Wed, 18 Sep 2019 19:12:08 +0000 (UTC) In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============1760488399== Content-Type: multipart/alternative; boundary="15688339283.f5340Eb5.23011" Content-Transfer-Encoding: 7bit --15688339283.f5340Eb5.23011 Date: Wed, 18 Sep 2019 19:12:08 +0000 MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated https://bugs.freedesktop.org/show_bug.cgi?id=3D72732 GitLab Migration User changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |MOVED --- Comment #3 from GitLab Migration User --- -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this = link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/476. --=20 You are receiving this mail because: You are the assignee for the bug.= --15688339283.f5340Eb5.23011 Date: Wed, 18 Sep 2019 19:12:08 +0000 MIME-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://bugs.freedesktop.org/ Auto-Submitted: auto-generated GitLab Migration User changed bug 72732<= /a>
What Removed Added
Status NEW RESOLVED
Resolution --- MOVED

Comment= # 3 on bug 72732<= /a> from GitLab Migration User
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been
closed from further activity.

You can subscribe and participate further through the new bug through this =
link
to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/476.


You are receiving this mail because:
  • You are the assignee for the bug.
= --15688339283.f5340Eb5.23011-- --===============1760488399== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs --===============1760488399==--