All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl
@ 2014-09-29 13:31 Daniel Vetter
  2014-10-23 13:28 ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2014-09-29 13:31 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

Not having checks for this isn't good.

I've checked igt and libdrm and they all already clear flags properly.
So we're lucky and should be able to sneak this ABI clarification in.

Testcase: igt/gem_wait/invalid-flags
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
---
 drivers/gpu/drm/i915/i915_gem.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index 2fb87cfa5b82..6891522c5d3b 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2811,6 +2811,9 @@ i915_gem_wait_ioctl(struct drm_device *dev, void *data, struct drm_file *file)
 	u32 seqno = 0;
 	int ret = 0;
 
+	if (args->flags != 0)
+		return -EINVAL;
+
 	ret = i915_mutex_lock_interruptible(dev);
 	if (ret)
 		return ret;
-- 
1.9.3

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl
  2014-09-29 13:31 [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl Daniel Vetter
@ 2014-10-23 13:28 ` Daniel Vetter
  2014-10-23 13:39   ` Damien Lespiau
  0 siblings, 1 reply; 4+ messages in thread
From: Daniel Vetter @ 2014-10-23 13:28 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, Daniel Vetter

On Mon, Sep 29, 2014 at 3:31 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> Not having checks for this isn't good.
>
> I've checked igt and libdrm and they all already clear flags properly.
> So we're lucky and should be able to sneak this ABI clarification in.
>
> Testcase: igt/gem_wait/invalid-flags
> Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85280

Some please review this little fix?
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl
  2014-10-23 13:28 ` Daniel Vetter
@ 2014-10-23 13:39   ` Damien Lespiau
  2014-10-23 14:12     ` Daniel Vetter
  0 siblings, 1 reply; 4+ messages in thread
From: Damien Lespiau @ 2014-10-23 13:39 UTC (permalink / raw)
  To: Daniel Vetter; +Cc: Daniel Vetter, Intel Graphics Development

On Thu, Oct 23, 2014 at 03:28:24PM +0200, Daniel Vetter wrote:
> On Mon, Sep 29, 2014 at 3:31 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > Not having checks for this isn't good.
> >
> > I've checked igt and libdrm and they all already clear flags properly.
> > So we're lucky and should be able to sneak this ABI clarification in.
> >
> > Testcase: igt/gem_wait/invalid-flags
> > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> 
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85280
> 
> Some please review this little fix?

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl
  2014-10-23 13:39   ` Damien Lespiau
@ 2014-10-23 14:12     ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2014-10-23 14:12 UTC (permalink / raw)
  To: Damien Lespiau; +Cc: Daniel Vetter, Intel Graphics Development, Daniel Vetter

On Thu, Oct 23, 2014 at 02:39:41PM +0100, Damien Lespiau wrote:
> On Thu, Oct 23, 2014 at 03:28:24PM +0200, Daniel Vetter wrote:
> > On Mon, Sep 29, 2014 at 3:31 PM, Daniel Vetter <daniel.vetter@ffwll.ch> wrote:
> > > Not having checks for this isn't good.
> > >
> > > I've checked igt and libdrm and they all already clear flags properly.
> > > So we're lucky and should be able to sneak this ABI clarification in.
> > >
> > > Testcase: igt/gem_wait/invalid-flags
> > > Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
> > 
> > Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=85280
> > 
> > Some please review this little fix?
> 
> Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>

Thanks for the mercy ;-) Patch merged to dinq now.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-10-23 14:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-09-29 13:31 [PATCH] drm/i915: Correctly reject invalid flags for wait_ioctl Daniel Vetter
2014-10-23 13:28 ` Daniel Vetter
2014-10-23 13:39   ` Damien Lespiau
2014-10-23 14:12     ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.