Re: [PATCH v2 01/13] mm/gup: have internal functions get the mmap_read_lock()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/24/23 12:34, Jason Gunthorpe wrote:
...
@@ -3183,11 +3198,13 @@ long pin_user_pages_unlocked(unsigned long start, unsigned long nr_pages,
  	/* FOLL_GET and FOLL_PIN are mutually exclusive. */
  	if (WARN_ON_ONCE(gup_flags & FOLL_GET))
  		return -EINVAL;
+	int locked = 0;
if (WARN_ON_ONCE(!pages))
  		return -EINVAL;
- gup_flags |= FOLL_PIN;
-	return get_user_pages_unlocked(start, nr_pages, pages, gup_flags);
+	gup_flags |= FOLL_PIN | FOLL_TOUCH;

I missed this on my review of v1 of this series: the FOLL_TOUCH change
looks like a mistake, yes? It should just be left as-is:

	gup_flags |= FOLL_PIN;

Everything else looks good.

thanks,
--
John Hubbard
NVIDIA




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux