]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/i915: set O_LARGEFILE in __create_shmem()
authorTaotao Chen <chentaotao@didiglobal.com>
Fri, 22 Aug 2025 03:06:59 +0000 (03:06 +0000)
committerAndi Shyti <andi.shyti@linux.intel.com>
Thu, 18 Sep 2025 10:56:59 +0000 (12:56 +0200)
commite296a2266c572a7537e638b0dbbfc66d11df46f9
tree3ea233d16e83fdd7cb6731c50c133d74618d4c6a
parentf088104d837a991c65e51fa30bb4196169b3244d
drm/i915: set O_LARGEFILE in __create_shmem()

Without O_LARGEFILE, file->f_op->write_iter calls
generic_write_check_limits(), which enforces a 2GB (MAX_NON_LFS) limit,
causing -EFBIG on large writes.

In shmem_pwrite(), this error is later masked as -EIO due to the error
handling order, leading to igt failures like gen9_exec_parse(bb-large).

Set O_LARGEFILE in __create_shmem() to prevent -EFBIG on large writes.

Reported-by: kernel test robot <oliver.sang@intel.com>
Closes: https://lore.kernel.org/oe-lkp/202508081029.343192ec-lkp@intel.com
Fixes: 048832a3f400 ("drm/i915: Refactor shmem_pwrite() to use kiocb and write_iter")
Signed-off-by: Taotao Chen <chentaotao@didiglobal.com>
Reviewed-by: Andi Shyti <andi.shyti@linux.intel.com>
Signed-off-by: Andi Shyti <andi.shyti@linux.intel.com>
Link: https://lore.kernel.org/r/20250822030651.28099-1-chentaotao@didiglobal.com
drivers/gpu/drm/i915/gem/i915_gem_shmem.c