All of lore.kernel.org
 help / color / mirror / Atom feed
* [folded-merged] mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix-2.patch removed from -mm tree
@ 2024-07-12 22:42 Andrew Morton
  0 siblings, 0 replies; only message in thread
From: Andrew Morton @ 2024-07-12 22:42 UTC (permalink / raw)
  To: mm-commits, syzbot+f1d7fb4f94764243d23e, muchun.song, kraxel,
	airlied, vivek.kasireddy, akpm


The quilt patch titled
     Subject: RE: [fs?] [mm?] INFO: task hung in remove_inode_hugepages
has been removed from the -mm tree.  Its filename was
     mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix-2.patch

This patch was dropped because it was folded into mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios.patch

------------------------------------------------------
From: "Kasireddy, Vivek" <vivek.kasireddy@intel.com>
Subject: RE: [fs?] [mm?] INFO: task hung in remove_inode_hugepages
Date:   Mon Jul 8 23:04:48 2024 -0700


return -EINVAL if the end offset is greater than the size of memfd

Link: https://lkml.kernel.org/r/IA0PR11MB71850525CBC7D541CAB45DF1F8DB2@IA0PR11MB7185.namprd11.prod.outlook.com
Signed-off-by: Vivek Kasireddy <vivek.kasireddy@intel.com>
Reported-by: <syzbot+f1d7fb4f94764243d23e@syzkaller.appspotmail.com>
Testted-by: <syzbot+f1d7fb4f94764243d23e@syzkaller.appspotmail.com>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>
Cc: Muchun Song <muchun.song@linux.dev>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/gup.c |    3 +++
 1 file changed, 3 insertions(+)

--- a/mm/gup.c~mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix-2
+++ a/mm/gup.c
@@ -3814,6 +3814,9 @@ long memfd_pin_folios(struct file *memfd
 	if (!shmem_file(memfd) && !is_file_hugepages(memfd))
 		return -EINVAL;
 
+	if (end >= i_size_read(file_inode(memfd)))
+		return -EINVAL;
+
 	if (is_file_hugepages(memfd)) {
 		h = hstate_file(memfd);
 		pgshift = huge_page_shift(h);
_

Patches currently in -mm which might be from vivek.kasireddy@intel.com are

mm-gup-introduce-unpin_folio-unpin_folios-helpers.patch
mm-gup-introduce-check_and_migrate_movable_folios.patch
mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios.patch
udmabuf-use-vmf_insert_pfn-and-vm_pfnmap-for-handling-mmap.patch
udmabuf-add-back-support-for-mapping-hugetlb-pages.patch
udmabuf-convert-udmabuf-driver-to-use-folios.patch
udmabuf-pin-the-pages-using-memfd_pin_folios-api.patch
selftests-udmabuf-add-tests-to-verify-data-after-page-migration.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-07-12 22:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-12 22:42 [folded-merged] mm-gup-introduce-memfd_pin_folios-for-pinning-memfd-folios-fix-2.patch removed from -mm tree Andrew Morton

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.