The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* spurious remap_file_pages() -EINVAL
@ 2004-07-04 12:04 William Lee Irwin III
  2004-07-04 19:22 ` Hugh Dickins
  0 siblings, 1 reply; 2+ messages in thread
From: William Lee Irwin III @ 2004-07-04 12:04 UTC (permalink / raw)
  To: linux-kernel; +Cc: akpm, hugh

As ->vm_private_data is used as a cursor for swapout of VM_NONLINEAR
vmas, the check for NULL ->vm_private_data or VM_RESERVED is too
strict, and should allow VM_NONLINEAR vmas with non-NULL ->vm_private_data.

This fixes an issue on 2.6.7-mm5 where system calls to remap_file_pages()
spuriously failed while under memory pressure.


Index: mm5-2.6.7/mm/fremap.c
===================================================================
--- mm5-2.6.7.orig/mm/fremap.c	2004-07-04 04:28:50.836939584 -0700
+++ mm5-2.6.7/mm/fremap.c	2004-07-04 04:30:37.645702184 -0700
@@ -194,7 +194,8 @@
 	 * or VM_LOCKED, but VM_LOCKED could be revoked later on).
 	 */
 	if (vma && (vma->vm_flags & VM_SHARED) &&
-		(!vma->vm_private_data || (vma->vm_flags & VM_RESERVED)) &&
+		(!vma->vm_private_data ||
+			(vma->vm_flags & (VM_NONLINEAR|VM_RESERVED))) &&
 		vma->vm_ops && vma->vm_ops->populate &&
 			end > start && start >= vma->vm_start &&
 				end <= vma->vm_end) {

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: spurious remap_file_pages() -EINVAL
  2004-07-04 12:04 spurious remap_file_pages() -EINVAL William Lee Irwin III
@ 2004-07-04 19:22 ` Hugh Dickins
  0 siblings, 0 replies; 2+ messages in thread
From: Hugh Dickins @ 2004-07-04 19:22 UTC (permalink / raw)
  To: William Lee Irwin III; +Cc: linux-kernel, akpm

On Sun, 4 Jul 2004, William Lee Irwin III wrote:
> As ->vm_private_data is used as a cursor for swapout of VM_NONLINEAR
> vmas, the check for NULL ->vm_private_data or VM_RESERVED is too
> strict, and should allow VM_NONLINEAR vmas with non-NULL ->vm_private_data.
> 
> This fixes an issue on 2.6.7-mm5 where system calls to remap_file_pages()
> spuriously failed while under memory pressure.

How embarrassing!  Yes, thank you.

Hugh


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-07-04 19:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-07-04 12:04 spurious remap_file_pages() -EINVAL William Lee Irwin III
2004-07-04 19:22 ` Hugh Dickins

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox