[Intel-gfx] [PATCH] drm/i915: Report -EFAULT before pwrite fast path into shmemfs

Chris Wilson chris at chris-wilson.co.uk
Tue Oct 17 13:08:43 UTC 2017


Quoting Joonas Lahtinen (2017-10-17 08:03:57)
> On Mon, 2017-10-16 at 21:27 +0100, Chris Wilson wrote:
> > When pwriting into shmemfs, the fast path pagecache_write does not
> > notice when it is writing to beyond the end of the truncated shmemfs
> > inode. Report -EFAULT directly when we try to use pwrite into the
> > !I915_MADV_WILLNEED object.
> > 
> > Fixes: 7c55e2c5772d ("drm/i915: Use pagecache write to prepopulate shmemfs from pwrite-ioctl")
> > Testcase: igt/gem_madvise/dontneed-before-pwrite
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Matthew Auld <matthew.william.auld at gmail.com>
> > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > Cc: Mika Kuoppala <mika.kuoppala at linux.intel.com>
> 
> Reviewed-by: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>

Ta, pushed.
-Chris


More information about the Intel-gfx mailing list