public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Weiner <hannes-kernel@saeurebad.de>
To: linux-kernel@vger.kernel.org
Cc: Tom Robinson <thomas.robinson@gmail.com>,
	linux-mm@kvack.org, Stephen Tweedie <sct@redhat.com>
Subject: Re: PROBLEM: kernel BUG at mm/swap_state.c:78! (v2.6.21 under vmware)
Date: Fri, 15 Jun 2007 17:06:18 +0200	[thread overview]
Message-ID: <20070615150618.GA19912@saeurebad.de> (raw)
In-Reply-To: <745af2c30706140842w5eabdf1bjdcc5fd7c2a92b77e@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 398 bytes --]

Hi,

I am not sure if this patch is a fix or a hiding (or leads to more trouble at
all), so, could PLEASE anyone with knowledge about the code see over it?
Thanks :)

shrink_page_list() should not pass a private page to add_to_swap().
Is it a bug if the page is private when reaching this point? I do not think
so, because a few lines below is a condition where private pages are handled
legally.


[-- Attachment #2: do-not-swap-private-pages.patch --]
[-- Type: text/plain, Size: 512 bytes --]

diff --git a/mm/vmscan.c b/mm/vmscan.c
index 1be5a63..92573b7 100644
--- a/mm/vmscan.c
+++ b/mm/vmscan.c
@@ -489,7 +489,8 @@ static unsigned long shrink_page_list(struct list_head *page_list,
 		 * Anonymous process memory has backing store?
 		 * Try to allocate it some swap space here.
 		 */
-		if (PageAnon(page) && !PageSwapCache(page))
+		if (PageAnon(page) && !PageSwapCache(page) &&
+		    !PagePrivate(page))
 			if (!add_to_swap(page, GFP_ATOMIC))
 				goto activate_locked;
 #endif /* CONFIG_SWAP */

  reply	other threads:[~2007-06-15 15:06 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-14 15:42 PROBLEM: kernel BUG at mm/swap_state.c:78! (v2.6.21 under vmware) Tom Robinson
2007-06-15 15:06 ` Johannes Weiner [this message]
2007-06-17  7:55 ` Tom Robinson

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=20070615150618.GA19912@saeurebad.de \
    --to=hannes-kernel@saeurebad.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mm@kvack.org \
    --cc=sct@redhat.com \
    --cc=thomas.robinson@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox