The patch titled Subject: tmpfs: ensure O_LARGEFILE with generic_file_open() has been added to the -mm mm-unstable branch. Its filename is tmpfs-ensure-o_largefile-with-generic_file_open.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/tmpfs-ensure-o_largefile-with-generic_file_open.patch This patch will later appear in the mm-unstable branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via the mm-everything branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there every 2-3 working days ------------------------------------------------------ From: Thomas WeiÃ?schuh <thomas.weissschuh@xxxxxxxxxxx> Subject: tmpfs: ensure O_LARGEFILE with generic_file_open() Date: Wed, 28 Sep 2022 12:45:35 +0200 Without this check open() will open large files on tmpfs although O_LARGEFILE was not specified. This is inconsistent with other filesystems. Also it will later result in EOVERFLOW on stat() or EFBIG on write(). Link: https://lore.kernel.org/lkml/76bedae6-22ea-4abc-8c06-b424ceb39217@xxxxxxxx/ Link: https://lkml.kernel.org/r/20220928104535.61186-1-linux@xxxxxxxxxxxxxx Signed-off-by: Thomas WeiÃ?schuh <thomas.weissschuh@xxxxxxxxxxx> Acked-by: Hugh Dickins <hughd@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/shmem.c | 1 + 1 file changed, 1 insertion(+) --- a/mm/shmem.c~tmpfs-ensure-o_largefile-with-generic_file_open +++ a/mm/shmem.c @@ -3885,6 +3885,7 @@ EXPORT_SYMBOL(shmem_aops); static const struct file_operations shmem_file_operations = { .mmap = shmem_mmap, + .open = generic_file_open, .get_unmapped_area = shmem_get_unmapped_area, #ifdef CONFIG_TMPFS .llseek = shmem_file_llseek, _ Patches currently in -mm which might be from thomas.weissschuh@xxxxxxxxxxx are tmpfs-ensure-o_largefile-with-generic_file_open.patch