linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: torvalds@transmeta.com
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] fix iounmap for non page aligned addresses
Date: Tue, 9 Jul 2002 13:55:34 +0200	[thread overview]
Message-ID: <20020709135534.A1155@averell> (raw)


Hi Linus,

This fixes a problem introduced by the pageattr ioremap/unmap patches.
iounmap lost the ability to free non page aligned addresses, which
are e.g. used by the bootflag code.  This patch fixes this.

Also fix a potential off by one bug.

-Andi



--- linux-work/arch/i386/mm/ioremap.c.~2~	Tue Jun 18 02:13:09 2002
+++ linux/arch/i386/mm/ioremap.c	Fri Jun 21 14:42:23 2002
@@ -213,9 +213,9 @@
 void iounmap(void *addr)
 { 
 	struct vm_struct *p;
-	if (addr < high_memory) 
+	if (addr <= high_memory) 
 		return; 
-	p = remove_kernel_area(addr); 
+	p = remove_kernel_area(PAGE_MASK & (unsigned long) addr); 
 	if (!p) { 
 		printk("__iounmap: bad address %p\n", addr);
 		return;

             reply	other threads:[~2002-07-09 11:53 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-09 11:55 Andi Kleen [this message]
2002-07-09 14:16 ` [PATCH] fix iounmap for non page aligned addresses 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=20020709135534.A1155@averell \
    --to=ak@muc.de \
    --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;
as well as URLs for NNTP newsgroup(s).