From: Rik van Riel <riel@conectiva.com.br>
To: Marcelo Tosatti <marcelo@conectiva.com.br>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org
Subject: [PATCH] bugfix for HIGHMEM_DEBUG
Date: Thu, 5 Dec 2002 14:30:51 -0200 (BRST) [thread overview]
Message-ID: <Pine.LNX.4.50L.0212051428070.22252-100000@duckman.distro.conectiva> (raw)
Hi Marcelo,
I found a bug in the HIGHMEM_DEBUG code, in kunmap_atomic()
to be specific. The problem is that kunmap_atomic() can get
called with an address which isn't page aligned, but we compare
that address to a page aligned address and bug if the two
aren't equal.
The obvious fix is to page-align the address before doing the
check, we're not doing anything else with it anyway since
kunmap_atomic() is a nop if HIGHMEM_DEBUG is off.
please apply,
Rik
--
A: No.
Q: Should I include quotations after my reply?
http://www.surriel.com/ http://guru.conectiva.com/
--- include/asm/highmem.h.orig 2002-12-05 13:23:31.000000000 -0200
+++ include/asm/highmem.h 2002-12-05 13:13:18.000000000 -0200
@@ -106,7 +106,7 @@
static inline void kunmap_atomic(void *kvaddr, enum km_type type)
{
#if HIGHMEM_DEBUG
- unsigned long vaddr = (unsigned long) kvaddr;
+ unsigned long vaddr = (unsigned long) kvaddr & PAGE_MASK;
enum fixed_addresses idx = type + KM_TYPE_NR*smp_processor_id();
if (vaddr < FIXADDR_START) // FIXME
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/
reply other threads:[~2002-12-05 16:31 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=Pine.LNX.4.50L.0212051428070.22252-100000@duckman.distro.conectiva \
--to=riel@conectiva.com.br \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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