From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] M68k free_io_area()
Date: Fri, 29 Aug 2003 16:51:07 +0200 [thread overview]
Message-ID: <200308291451.h7TEp7tI005896@callisto.of.borg> (raw)
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 1096 bytes --]
M68k: Take the gap into account in free_io_area() (from Michael Müller)
--- linux-2.4.23-pre1/arch/m68k/mm/kmap.c Mon Feb 19 10:36:43 2001
+++ linux-m68k-2.4.23-pre1/arch/m68k/mm/kmap.c Tue Jul 1 22:06:18 2003
@@ -71,7 +71,7 @@
addr = tmp->size + (unsigned long)tmp->addr;
}
area->addr = (void *)addr;
- area->size = size + IO_SIZE;
+ area->size = size + IO_SIZE; /* leave a gap between */
area->next = *p;
*p = area;
return area;
@@ -87,7 +87,10 @@
for (p = &iolist ; (tmp = *p) ; p = &tmp->next) {
if (tmp->addr == addr) {
*p = tmp->next;
- __iounmap(tmp->addr, tmp->size);
+ if ( tmp->size > IO_SIZE )
+ __iounmap(tmp->addr, tmp->size - IO_SIZE);
+ else
+ printk("free_io_area: Invalid I/O area size %lu\n", tmp->size);
kfree(tmp);
return;
}
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
reply other threads:[~2003-08-29 14:52 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=200308291451.h7TEp7tI005896@callisto.of.borg \
--to=geert@linux-m68k.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/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).