All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c
@ 2013-12-15 16:05 bugzilla-daemon
  2014-01-01  1:26 ` [Bug 72732] " bugzilla-daemon
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: bugzilla-daemon @ 2013-12-15 16:05 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 1283 bytes --]

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.

[-- Attachment #1.2: Type: text/html, Size: 2668 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 72732] Missing NULL check; radeon_drm_winsys.c
  2013-12-15 16:05 [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c bugzilla-daemon
@ 2014-01-01  1:26 ` bugzilla-daemon
  2014-01-01 14:43 ` bugzilla-daemon
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-01-01  1:26 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 974 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=72732

--- Comment #1 from Dave Gilbert <freedesktop@treblig.org> ---
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.

[-- Attachment #1.2: Type: text/html, Size: 1739 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 72732] Missing NULL check; radeon_drm_winsys.c
  2013-12-15 16:05 [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c bugzilla-daemon
  2014-01-01  1:26 ` [Bug 72732] " bugzilla-daemon
@ 2014-01-01 14:43 ` bugzilla-daemon
  2014-02-08 21:09 ` bugzilla-daemon
  2019-09-18 19:12 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-01-01 14:43 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 487 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=72732

--- Comment #2 from Dave Gilbert <freedesktop@treblig.org> ---
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.

[-- Attachment #1.2: Type: text/html, Size: 1244 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 72732] Missing NULL check; radeon_drm_winsys.c
  2013-12-15 16:05 [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c bugzilla-daemon
  2014-01-01  1:26 ` [Bug 72732] " bugzilla-daemon
  2014-01-01 14:43 ` bugzilla-daemon
@ 2014-02-08 21:09 ` bugzilla-daemon
  2019-09-18 19:12 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2014-02-08 21:09 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 382 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=72732

Andreas Boll <andreas.boll.dev@gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|Drivers/DRI/R600            |Drivers/Gallium/r600

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #1.2: Type: text/html, Size: 1068 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug 72732] Missing NULL check; radeon_drm_winsys.c
  2013-12-15 16:05 [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c bugzilla-daemon
                   ` (2 preceding siblings ...)
  2014-02-08 21:09 ` bugzilla-daemon
@ 2019-09-18 19:12 ` bugzilla-daemon
  3 siblings, 0 replies; 5+ messages in thread
From: bugzilla-daemon @ 2019-09-18 19:12 UTC (permalink / raw)
  To: dri-devel


[-- Attachment #1.1: Type: text/plain, Size: 840 bytes --]

https://bugs.freedesktop.org/show_bug.cgi?id=72732

GitLab Migration User <gitlab-migration@fdo.invalid> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #3 from GitLab Migration User <gitlab-migration@fdo.invalid> ---
-- 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.

[-- Attachment #1.2: Type: text/html, Size: 2408 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-09-18 19:12 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-12-15 16:05 [Bug 72732] New: Missing NULL check; radeon_drm_winsys.c bugzilla-daemon
2014-01-01  1:26 ` [Bug 72732] " bugzilla-daemon
2014-01-01 14:43 ` bugzilla-daemon
2014-02-08 21:09 ` bugzilla-daemon
2019-09-18 19:12 ` bugzilla-daemon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.