All of lore.kernel.org
 help / color / mirror / Atom feed
From: William Lee Irwin III <wli@holomorphy.com>
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, hugh@veritas.com
Subject: spurious remap_file_pages() -EINVAL
Date: Sun, 4 Jul 2004 05:04:01 -0700	[thread overview]
Message-ID: <20040704120401.GE21066@holomorphy.com> (raw)

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) {

             reply	other threads:[~2004-07-04 12:04 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-04 12:04 William Lee Irwin III [this message]
2004-07-04 19:22 ` spurious remap_file_pages() -EINVAL Hugh Dickins

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040704120401.GE21066@holomorphy.com \
    --to=wli@holomorphy.com \
    --cc=akpm@osdl.org \
    --cc=hugh@veritas.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.