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

Joonas Lahtinen joonas.lahtinen at linux.intel.com
Tue Oct 17 07:03:57 UTC 2017


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>

Regards, Joonas
-- 
Joonas Lahtinen
Open Source Technology Center
Intel Corporation


More information about the Intel-gfx mailing list