From: Jens Axboe <jens.axboe@oracle.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Alexey Dobriyan <adobriyan@gmail.com>,
Linus Torvalds <torvalds@linux-foundation.org>,
linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
mark.fasheh@oracle.com
Subject: Re: 2.6.23-rc1: BUG_ON in kmap_atomic_prot()
Date: Tue, 24 Jul 2007 10:17:50 +0200 [thread overview]
Message-ID: <20070724081750.GM3287@kernel.dk> (raw)
In-Reply-To: <20070723152712.02ded067.akpm@linux-foundation.org>
On Mon, Jul 23 2007, Andrew Morton wrote:
> I worked out that the crash I saw was in
>
> BUG_ON(!pte_none(*(kmap_pte-idx)));
>
> in the read of kmap_pte[idx]. Which would be weird as the caller is using
> a literal KM_USER0.
>
> So maybe I goofed, and that BUG_ON is triggering (it scrolled off, and I am
> unable to reproduce it now).
>
> If that BUG_ON _is_ triggering then it might indicate that someone is doing
> a __GFP_HIGHMEM|__GFP_ZERO allocation while holding KM_USER0.
Or doing double kunmaps, or doing a kunmap_atomic() on the page, not the
address. I've seen both of those end up triggering that BUG_ON() in a
later kmap.
Looking over the 2.6.22..2.6.23-rc1 diff, I found one such error in
ocfs2 at least. But you are probably not using that, so I'll keep
looking...
---
[PATCH] ocfs2: bad kunmap_atomic()
kunmap_atomic() takes the virtual address, not the mapped page as
argument.
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
diff --git a/fs/ocfs2/file.c b/fs/ocfs2/file.c
index 5727cd1..c4034f6 100644
--- a/fs/ocfs2/file.c
+++ b/fs/ocfs2/file.c
@@ -2153,7 +2153,7 @@ static int ocfs2_splice_write_actor(struct pipe_inode_info *pipe,
src = buf->ops->map(pipe, buf, 1);
dst = kmap_atomic(page, KM_USER1);
memcpy(dst + offset, src + buf->offset, count);
- kunmap_atomic(page, KM_USER1);
+ kunmap_atomic(dst, KM_USER1);
buf->ops->unmap(pipe, buf, src);
copied = ocfs2_write_end(file, file->f_mapping, sd->pos, count, count,
--
Jens Axboe
next prev parent reply other threads:[~2007-07-24 8:17 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <alpine.LFD.0.999.0707221351030.3607@woody.linux-foundation.org>
[not found] ` <20070723183839.GA5874@martell.zuzino.mipt.ru>
[not found] ` <20070723190152.GA5755@martell.zuzino.mipt.ru>
2007-07-23 20:24 ` 2.6.23-rc1: BUG_ON in kmap_atomic_prot() Andrew Morton
2007-07-23 20:40 ` Alexey Dobriyan
2007-07-23 21:01 ` Alexey Dobriyan
2007-07-23 21:11 ` Andrew Morton
2007-07-23 21:28 ` Linus Torvalds
2007-07-23 21:37 ` Sam Ravnborg
2007-07-24 17:59 ` Adrian Bunk
2007-07-24 18:14 ` Linus Torvalds
2007-07-24 18:28 ` Andrew Morton
2007-07-24 19:15 ` Linus Torvalds
2007-07-24 19:40 ` Adrian Bunk
2007-07-24 19:48 ` Linus Torvalds
2007-07-26 18:07 ` Adrian Bunk
2007-07-26 18:19 ` Linus Torvalds
2007-07-24 20:27 ` Andi Kleen
2007-07-24 19:45 ` Linus Torvalds
2007-07-26 6:09 ` commit 7e92b4fc34 - x86, serial: convert legacy COM ports to platform devices - broke my serial console H. Peter Anvin
2007-07-23 22:04 ` 2.6.23-rc1: BUG_ON in kmap_atomic_prot() Alexey Dobriyan
2007-07-23 22:27 ` Andrew Morton
2007-07-24 5:20 ` Alexey Dobriyan
2007-07-24 8:17 ` Jens Axboe [this message]
2007-07-24 8:22 ` Jens Axboe
2007-07-24 8:34 ` Andrew Morton
2007-07-24 14:00 ` Dan Williams
2007-07-24 13:55 ` Dan Williams
2007-07-24 10:01 ` Mike Galbraith
2007-07-24 10:37 ` Mike Galbraith
2007-07-24 16:28 ` Andrew Morton
2007-07-24 18:25 ` Linus Torvalds
2007-07-24 20:05 ` Alexey Dobriyan
2007-07-25 5:09 ` Mike Galbraith
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=20070724081750.GM3287@kernel.dk \
--to=jens.axboe@oracle.com \
--cc=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.fasheh@oracle.com \
--cc=netdev@vger.kernel.org \
--cc=torvalds@linux-foundation.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;
as well as URLs for NNTP newsgroup(s).