mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@suse.de>
To: Marc-Christian Petersen <m.c.p@wolk-project.de>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>,
	Linus Torvalds <torvalds@osdl.org>
Subject: Re: do we want to kill VM_RESERVED or not? [was Re: 2.6.5-rc1-aa3]
Date: Mon, 22 Mar 2004 13:42:57 +0100	[thread overview]
Message-ID: <20040322124257.GT3649@dualathlon.random> (raw)
In-Reply-To: <200403221310.38481@WOLK>

On Mon, Mar 22, 2004 at 01:10:38PM +0100, Marc-Christian Petersen wrote:
> And VMware won't work at all. Booting a VMware Image triggers the 2 warnings 
> and the kernel BUG and the screen stays black in VMware.

I see, the below patch will avoid your oops (I also removed the stack
trace dump from memory.c since it's useless to get the stack trace from
there and this will reduce the noise).

--- x/mm/memory.c.~1~	2004-03-21 15:21:42.000000000 +0100
+++ x/mm/memory.c	2004-03-22 13:40:26.852849384 +0100
@@ -324,9 +324,11 @@ skip_copy_pte_range:
 					 * Device driver pages must not be
 					 * tracked by the VM for unmapping.
 					 */
-					BUG_ON(!page_mapped(page));
-					BUG_ON(!page->mapping);
-					page_add_rmap(page, vma, address, PageAnon(page));
+					if (likely(page_mapped(page) && page->mapping))
+						page_add_rmap(page, vma, address, PageAnon(page));
+					else
+						printk("Badness in %s at %s:%d\n",
+						       __FUNCTION__, __FILE__, __LINE__);
 				} else {
 					BUG_ON(page_mapped(page));
 					BUG_ON(page->mapping);
@@ -1429,7 +1431,9 @@ retry:
 	 * real anonymous pages, they're "device" reserved pages instead.
 	 */
 	reserved = !!(vma->vm_flags & VM_RESERVED);
-	WARN_ON(reserved == pageable);
+	if (unlikely(reserved == pageable))
+		printk("Badness in %s at %s:%d\n",
+		       __FUNCTION__, __FILE__, __LINE__);
 
 	/*
 	 * Should we do an early C-O-W break?

many thanks for the help!

  reply	other threads:[~2004-03-22 12:42 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-20 21:03 2.6.5-rc1-aa3 Andrea Arcangeli
2004-03-20 22:06 ` 2.6.5-rc1-aa3 Andrew Morton
2004-03-21  6:17 ` 2.6.5-rc1-aa3 Martin J. Bligh
2004-03-21 11:51   ` 2.6.5-rc1-aa3 Andrea Arcangeli
2004-03-21 13:26   ` 2.6.5-rc1-aa3 Andrea Arcangeli
2004-03-21 16:23     ` 2.6.5-rc1-aa3 Martin J. Bligh
2004-03-21 10:05 ` 2.6.5-rc1-aa3 Marc-Christian Petersen
2004-03-21 11:49   ` do we want to kill VM_RESERVED or not? [was Re: 2.6.5-rc1-aa3] Andrea Arcangeli
2004-03-21 12:00     ` Andrea Arcangeli
2004-03-21 12:15       ` Andrea Arcangeli
2004-03-21 19:42         ` Marc-Christian Petersen
2004-03-22  0:10           ` Andrea Arcangeli
2004-03-22 12:10             ` Marc-Christian Petersen
2004-03-22 12:42               ` Andrea Arcangeli [this message]
2004-03-23  9:54                 ` Marc-Christian Petersen
2004-03-21 23:24     ` Andrew Morton
2004-03-22  0:51       ` Andrea Arcangeli

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=20040322124257.GT3649@dualathlon.random \
    --to=andrea@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.c.p@wolk-project.de \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome