[Bug 87094] [all]igt/drm_read subcases short-buffer-block and short-buffer-nonblock fail
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Wed Jan 7 10:01:03 PST 2015
https://bugs.freedesktop.org/show_bug.cgi?id=87094
Chris Wilson <chris at chris-wilson.co.uk> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from Chris Wilson <chris at chris-wilson.co.uk> ---
Should be fixed now:
commit b710d754bd4f80be922c40d8c1231d20f8e55e09
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date: Thu Dec 4 21:03:25 2014 +0000
drm: Make drm_read() more robust against multithreaded races
The current implementation of drm_read() faces a number of issues:
1. Upon an error, it consumes the event which may lead to the client
blocking.
2. Upon an error, it forgets about events already copied
3. If it fails to copy a single event with O_NONBLOCK it falls into a
infinite loop of reporting EAGAIN.
3. There is a race between multiple waiters and blocking reads of the
events list.
Here, we inline drm_dequeue_event() into drm_read() so that we can take
the spinlock around the list walking and event copying, and importantly
reorder the error handling to avoid the issues above.
Cc: Takashi Iwai <tiwai at suse.de>
Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
Reviewed-by: Takashi Iwai <tiwai at suse.de>
Testcase: igt/drm_read
Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are on the CC list for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx-bugs/attachments/20150107/0dfad7e0/attachment-0001.html>
More information about the intel-gfx-bugs
mailing list