<html>
<head>
<base href="https://bugzilla.gnome.org/" />
</head>
<body><span class="vcard"><a href="page.cgi?id=describeuser.html&login=rstrode%40redhat.com" title="Ray Strode [halfline] <rstrode@redhat.com>"> <span class="fn">Ray Strode [halfline]</span></a>
</span> changed
<a class="bz_bug_link
bz_status_NEW "
title="NEW - Do not rely on memfd as it requires a fairly recent kernel"
href="https://bugzilla.gnome.org/show_bug.cgi?id=766341">bug 766341</a>
<br>
<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
<tr>
<td style="text-align:right;">Attachment #327992 status</td>
<td>needs-work
</td>
<td>none
</td>
</tr>
<tr>
<td style="text-align:right;">Attachment #327992 is obsolete</td>
<td>
</td>
<td>1
</td>
</tr></table>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - Do not rely on memfd as it requires a fairly recent kernel"
href="https://bugzilla.gnome.org/show_bug.cgi?id=766341#c28">Comment # 28</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - Do not rely on memfd as it requires a fairly recent kernel"
href="https://bugzilla.gnome.org/show_bug.cgi?id=766341">bug 766341</a>
from <span class="vcard"><a href="page.cgi?id=describeuser.html&login=rstrode%40redhat.com" title="Ray Strode [halfline] <rstrode@redhat.com>"> <span class="fn">Ray Strode [halfline]</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=328002&action=diff" name="attach_328002" title="wayland: fix error handling for memfd_create">attachment 328002</a> <a href="attachment.cgi?id=328002&action=edit" title="wayland: fix error handling for memfd_create">[details]</a></span> <a href='review?bug=766341&attachment=328002'>[review]</a>
wayland: fix error handling for memfd_create
We currently use syscall() directly to invoke memfd_create,
since the function isn't available in libc headers yet.
The code, though, mishandles how errors are passed from syscall().
It assumes syscall returns the error code directly (but negative),
when in fact, syscall() uses errno.
Also, the code fails to retry on EINTR.
This commit moves the handling of memfd create to a helper function,
and changes the code to use errno and handle EINTR.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>