From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 66332] New: drmHandleEvent returns 0 on read() failure
Date: Fri, 28 Jun 2013 16:31:42 +0000
Message-ID:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0930188808=="
Return-path:
Received: from culpepper.freedesktop.org (unknown [131.252.210.165])
by gabe.freedesktop.org (Postfix) with ESMTP id F307AE66CF
for ;
Fri, 28 Jun 2013 09:31:42 -0700 (PDT)
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Sender: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org
Errors-To: dri-devel-bounces+sf-dri-devel=m.gmane.org@lists.freedesktop.org
To: dri-devel@lists.freedesktop.org
List-Id: dri-devel@lists.freedesktop.org
--===============0930188808==
Content-Type: multipart/alternative; boundary="1372437102.bc2d0.31734"; charset="us-ascii"
--1372437102.bc2d0.31734
Date: Fri, 28 Jun 2013 16:31:42 +0000
MIME-Version: 1.0
Content-Type: text/plain; charset="UTF-8"
https://bugs.freedesktop.org/show_bug.cgi?id=66332
Priority: medium
Bug ID: 66332
Assignee: dri-devel@lists.freedesktop.org
Summary: drmHandleEvent returns 0 on read() failure
Severity: normal
Classification: Unclassified
OS: All
Reporter: mgold@qnx.com
Hardware: All
Status: NEW
Version: XOrg CVS
Component: libdrm
Product: DRI
drmHandleEvent contains this code:
len = read(fd, buffer, sizeof buffer);
if (len == 0)
return 0;
if (len < sizeof *e)
return -1;
In the (len < sizeof *e) check, len gets promoted to size_t (which is
unsigned); so when len is negative "return -1" won't be executed. Instead, the
function continues to the end and returns 0. (The documentation states
drmHandleEvent will return -1 if the read fails.)
If there's an error like EBADF, the caller won't detect it and might end up
busy-waiting. Rewriting the condition as (len < (int)(sizeof *e)) will fix
this.
--
You are receiving this mail because:
You are the assignee for the bug.
--1372437102.bc2d0.31734
Date: Fri, 28 Jun 2013 16:31:42 +0000
MIME-Version: 1.0
Content-Type: text/html; charset="UTF-8"
| Priority |
medium
|
| Bug ID |
66332
|
| Assignee |
dri-devel@lists.freedesktop.org
|
| Summary |
drmHandleEvent returns 0 on read() failure
|
| Severity |
normal
|
| Classification |
Unclassified
|
| OS |
All
|
| Reporter |
mgold@qnx.com
|
| Hardware |
All
|
| Status |
NEW
|
| Version |
XOrg CVS
|
| Component |
libdrm
|
| Product |
DRI
|
drmHandleEvent contains this code:
len = read(fd, buffer, sizeof buffer);
if (len == 0)
return 0;
if (len < sizeof *e)
return -1;
In the (len < sizeof *e) check, len gets promoted to size_t (which is
unsigned); so when len is negative "return -1" won't be executed. Instead, the
function continues to the end and returns 0. (The documentation states
drmHandleEvent will return -1 if the read fails.)
If there's an error like EBADF, the caller won't detect it and might end up
busy-waiting. Rewriting the condition as (len < (int)(sizeof *e)) will fix
this.
You are receiving this mail because:
- You are the assignee for the bug.
--1372437102.bc2d0.31734--
--===============0930188808==
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
--===============0930188808==--
From mboxrd@z Thu Jan 1 00:00:00 1970
From: bugzilla-daemon@freedesktop.org
Subject: [Bug 66332] drmHandleEvent returns 0 on read() failure
Date: Tue, 24 Sep 2019 17:08:45 +0000
Message-ID:
References:
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="===============0250549928=="
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 542C46EADA
for ; Tue, 24 Sep 2019 17:08:45 +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
--===============0250549928==
Content-Type: multipart/alternative; boundary="15693449251.Bb4E5E7de.19385"
Content-Transfer-Encoding: 7bit
--15693449251.Bb4E5E7de.19385
Date: Tue, 24 Sep 2019 17:08:45 +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=3D66332
GitLab Migration User changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |MOVED
Status|NEW |RESOLVED
--- Comment #1 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/drm/issues/11.
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--15693449251.Bb4E5E7de.19385
Date: Tue, 24 Sep 2019 17:08:45 +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 66332<=
/a>
| What |
Removed |
Added |
| Resolution |
---
|
MOVED
|
| Status |
NEW
|
RESOLVED
|
You are receiving this mail because:
- You are the assignee for the bug.
=
--15693449251.Bb4E5E7de.19385--
--===============0250549928==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline
X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs
IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz
dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVs
--===============0250549928==--