linux-arm-msm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gustavo Padovan <gustavo.padovan@collabora.com>
To: Chris Wilson <chris@chris-wilson.co.uk>,
	Gustavo Padovan <gustavo@padovan.org>,
	dri-devel@lists.freedesktop.org,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU"
	<linux-arm-msm@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>,
	"open list:DRM DRIVER FOR MSM ADRENO GPU"
	<freedreno@lists.freedesktop.org>
Subject: Re: [PATCH] drm/msm: return fence_fd = -1 if gem_submit fails
Date: Mon, 12 Dec 2016 19:23:25 -0200	[thread overview]
Message-ID: <20161212212325.GD17192@joana> (raw)
In-Reply-To: <20161212204213.GK20316@nuc-i3427.alporthouse.com>

2016-12-12 Chris Wilson <chris@chris-wilson.co.uk>:

> On Mon, Dec 12, 2016 at 05:41:08PM -0200, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> > 
> > Previously we were returning garbage here, fix it by setting it to -1
> > before the first possible point of failure.
> 
> The convention is that on error paths you do not modify user inputs. In
> particular, consider EINTR where the usual pattern (e.g. drmIoctl) is
> 
> 	do {
> 		err = ioctl(fd, SUBMIT, arg);
> 	} while (err == -EINTR);
> 
> If you modify the in fence before you consume it, you can't recreate it
> after handling the signal.

Right. I didn't know about that convention. So maybe we let it as is. :)

Gustavo

      reply	other threads:[~2016-12-12 21:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-12 19:41 [PATCH] drm/msm: return fence_fd = -1 if gem_submit fails Gustavo Padovan
     [not found] ` <1481571668-14094-1-git-send-email-gustavo-THi1TnShQwVAfugRpC6u6w@public.gmane.org>
2016-12-12 20:42   ` Chris Wilson
2016-12-12 21:23     ` Gustavo Padovan [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20161212212325.GD17192@joana \
    --to=gustavo.padovan@collabora.com \
    --cc=chris@chris-wilson.co.uk \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=freedreno@lists.freedesktop.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=gustavo@padovan.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).