public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Ingo Molnar <mingo@elte.hu>
To: Lorenzo Allegrucci <l_allegrucci@yahoo.it>
Cc: Andrew Morton <akpm@osdl.org>,
	linux-kernel@vger.kernel.org, Andi Kleen <ak@suse.de>
Subject: Re: 2.6.10-rc1-mm3
Date: Fri, 5 Nov 2004 12:09:51 +0100	[thread overview]
Message-ID: <20041105110951.GA29702@elte.hu> (raw)
In-Reply-To: <20041105102204.GA4730@elte.hu>


* Ingo Molnar <mingo@elte.hu> wrote:

> > ------------[ cut here ]------------
> > kernel BUG at mm/memory.c:156!
> 
> > Process shmt04 (pid: 4854, threadinfo=dca51000 task=de374510)
> 
> reproducible here too, just running LTP's shmt04 directly triggers it
> immediately. Looks like there's interaction of 4-level pagetables with
> ipc/shm.c or mm/shmem.c.

due to the PML4 feature, the clear_page_tables() function changed to
clear_page_range(), changing its (first,size) argument to (first,last). 
Normally it's called with (0,TASK_SIZE) which normally is PML4-aligned,
but in the (relatively rare) do_munmap() use this is not the case. We
correctly calculate the range that could be cleared, but it's not
PML4_SIZE aligned.

The solution is to clip both 'first' and 'last' to PML4_SIZE boundary.
Since when we calculate 'first' we add at least +PML4_SIZE to the value,
it is safe to clip 'first'. It is obviously safe to clip 'last'.

The patch below implements this fix - it boots & works fine and shmt04
doesnt crash anymore. Andi, do you agree with this fix?

	Ingo

Signed-off-by: Ingo Molnar <mingo@elte.hu>

--- linux/mm/mmap.c.orig
+++ linux/mm/mmap.c
@@ -1545,7 +1545,7 @@ no_mmaps:
 	}
 	if (pml4_index(last) > start_pml4_index ||
 	    pgd_index(last) > start_pgd_index) {
-		clear_page_range(tlb, first, last);
+		clear_page_range(tlb, first & PML4_MASK, last & PML4_MASK);
 		flush_tlb_pgtables(mm, first & PML4_MASK, last & PML4_MASK);
 	}
 }

  parent reply	other threads:[~2004-11-05 11:11 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-11-05  8:13 2.6.10-rc1-mm3 Andrew Morton
2004-11-05  9:41 ` 2.6.10-rc1-mm3 Lorenzo Allegrucci
2004-11-05 10:17   ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-05 10:48     ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:36       ` 2.6.10-rc1-mm3 Lorenzo Allegrucci
2004-11-05 10:22   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 10:38     ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 11:09     ` Ingo Molnar [this message]
2004-11-05 11:17       ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 11:24         ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 11:43           ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:15           ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 12:22             ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:57               ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 13:02                 ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 17:47                   ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 11:20       ` 2.6.10-rc1-mm3 Russell King
2004-11-05 11:30         ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 10:17 ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-05 15:54   ` 2.6.10-rc1-mm3 Michael Baehr
2004-11-05 10:56 ` 2.6.10-rc1-mm3 Con Kolivas
2004-11-05 16:45 ` 2.6.10-rc1-mm3: ACPI problem due to un-exported hotplug_path Adrian Bunk
2004-11-05 18:05   ` Greg KH
2004-11-05 20:10     ` Kay Sievers
2004-11-05 20:32       ` Ashok Raj
2004-11-05 20:43         ` Greg KH
2004-11-05 20:45         ` Kay Sievers
2004-11-05 20:42       ` Greg KH
2004-11-06  5:18         ` Keshavamurthy Anil S
2004-11-06  5:50           ` Dmitry Torokhov
2004-11-09 22:55           ` Greg KH
2004-11-09 23:48             ` [ACPI] " Dmitry Torokhov
2004-11-10  0:08               ` Greg KH
2004-11-10  4:15                 ` Dmitry Torokhov
2004-11-16  5:54                   ` Greg KH
2004-11-05 16:52 ` 2.6.10-rc1-mm3: drm_ati_pcigart_{init,cleanup} multiple definition Adrian Bunk
2004-11-05 17:19   ` Dave Airlie
2004-11-05 17:33     ` Jon Smirl
2004-11-05 18:07 ` 2.6.10-rc1-mm3 Rafael J. Wysocki
2004-11-05 18:48   ` 2.6.10-rc1-mm3: (fix for make xconfig) Rafael J. Wysocki
2004-11-05 20:26     ` Sam Ravnborg
2004-11-08 22:34       ` Sam Ravnborg
2004-11-05 18:07 ` 2.6.10-rc1-mm3 Adam Heath
2004-11-06  7:16 ` 2.6.10-rc1-mm3 Pasi Savolainen
2004-11-06  9:39 ` [PATCH][TRIVIAL] sched.c whitespace mangler Con Kolivas
2004-11-07  1:32 ` 2.6.10-rc1-mm3: "bttv card=" breakage Adrian Bunk
2004-11-07  2:15   ` Andrew Morton
     [not found] <20041105001328.3ba97e08.akpm@osdl.org.suse.lists.linux.kernel>
     [not found] ` <418B5C70.7090206@kolivas.org.suse.lists.linux.kernel>
2004-11-05 11:53   ` 2.6.10-rc1-mm3 Andi Kleen
2004-11-05 12:16     ` 2.6.10-rc1-mm3 Con Kolivas
2004-11-05 12:23       ` 2.6.10-rc1-mm3 Andi Kleen
  -- strict thread matches above, loose matches on Subject: below --
2004-11-06 19:04 2.6.10-rc1-mm3 Paul Blazejowski
2004-11-07 10:48 ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-07 17:24   ` 2.6.10-rc1-mm3 Paul Blazejowski
2004-11-08  7:59   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-08  7:42     ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-08 22:42       ` 2.6.10-rc1-mm3 Greg KH
2004-11-09  5:27         ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09  7:14           ` 2.6.10-rc1-mm3 Greg KH
2004-11-09  8:05             ` 2.6.10-rc1-mm3 Greg KH
2004-11-09  8:15               ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09  8:27                 ` 2.6.10-rc1-mm3 Greg KH
2004-11-09 12:11               ` 2.6.10-rc1-mm3 Tejun Heo
2004-11-09  7:53           ` 2.6.10-rc1-mm3 Olivier Poitrey
2004-11-09  8:22             ` 2.6.10-rc1-mm3 Arjan van de Ven
2004-11-09  9:25               ` 2.6.10-rc1-mm3 Olivier Poitrey
2004-11-09 10:37               ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-09  9:39                 ` 2.6.10-rc1-mm3 Andrew Morton
2004-11-09 10:44                   ` 2.6.10-rc1-mm3 Ingo Molnar
2004-11-09 10:33           ` 2.6.10-rc1-mm3 Andries Brouwer
2004-11-11  1:52             ` 2.6.10-rc1-mm3 H. Peter Anvin
2004-11-09 18:24           ` 2.6.10-rc1-mm3 Paul Blazejowski
2004-11-08 12:34 2.6.10-rc1-mm3 Karsten Wiese
2004-11-08 21:40 ` 2.6.10-rc1-mm3 Karsten Wiese
2004-11-08 22:25   ` 2.6.10-rc1-mm3 linux-os
2004-11-08 23:30   ` 2.6.10-rc1-mm3 Chris Wright

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=20041105110951.GA29702@elte.hu \
    --to=mingo@elte.hu \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=l_allegrucci@yahoo.it \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox