mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Linus Torvalds <torvalds@transmeta.com>
Cc: <linux-kernel@vger.kernel.org>
Subject: [PATCH] 7: 2.5.29-mmap
Date: Sat, 03 Aug 2002 19:16:17 +0100	[thread overview]
Message-ID: <E17b3Rp-0006wV-00@flint.arm.linux.org.uk> (raw)

This patch has been verified to apply cleanly to 2.5.30

This patch goes back almost 2 years.  First sent on: 30 September 2000
Ignored every time.

The following patch is required so that munmap(0x8000, *) does not cause
ARM kernels to crash.  The problem is that the machine vectors are at
virtual address 0.  Unfortunately, when free_pgtables() is called, it
clears first level page tables starting at 0 in this case, and takes
out the machine vectors.  This then results in an unrecoverable hang.

We already have FIRST_USER_PGD_NR to define the first entry in the pgd
which may be cleared, so we use this to clamp "start_index"
appropriately.  The following patch does this.  Tested on ARM.

 mm/mmap.c |    2 ++
 1 files changed, 2 insertions

diff -urN orig/mm/mmap.c linux/mm/mmap.c
--- orig/mm/mmap.c	Sat Jul 27 13:55:25 2002
+++ linux/mm/mmap.c	Sat Jul 27 14:14:43 2002
@@ -888,6 +888,8 @@
 	 * old method of shifting the VA >> by PGDIR_SHIFT doesn't work.
 	 */
 	start_index = pgd_index(first);
+	if (start_index < FIRST_USER_PGD_NR)
+		start_index = FIRST_USER_PGD_NR;
 	end_index = pgd_index(last);
 	if (end_index > start_index) {
 		clear_page_tables(tlb, start_index, end_index - start_index);


                 reply	other threads:[~2002-08-03 18:14 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=E17b3Rp-0006wV-00@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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

all inboxes | Powered by JetHome®