Re: [PATCH] drm/msm: return fence_fd = -1 if gem_submit fails

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2016-12-12 Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>:

> On Mon, Dec 12, 2016 at 05:41:08PM -0200, Gustavo Padovan wrote:
> > From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
> > 
> > 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

--
To unsubscribe from this list: send the line "unsubscribe linux-arm-msm" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux