LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Justin Piszcz <jpiszcz@lucidpixels.com>
Cc: Chuck Ebbert <cebbert@redhat.com>,
linux-kernel@vger.kernel.org, linux-raid@vger.kernel.org,
xfs@oss.sgi.com, Neil Brown <neilb@suse.de>
Subject: Re: Kernel 2.6.19.2 New RAID 5 Bug (oops when writing Samba -> RAID5)
Date: Fri, 26 Jan 2007 01:25:05 -0800 [thread overview]
Message-ID: <20070126012505.d8cb07f2.akpm@osdl.org> (raw)
In-Reply-To: <Pine.LNX.4.64.0701241836590.2930@p34.internal.lan>
On Wed, 24 Jan 2007 18:37:15 -0500 (EST)
Justin Piszcz <jpiszcz@lucidpixels.com> wrote:
> > Without digging too deeply, I'd say you've hit the same bug Sami Farin and
> > others
> > have reported starting with 2.6.19: pages mapped with kmap_atomic() become
> > unmapped
> > during memcpy() or similar operations. Try disabling preempt -- that seems to
> > be the
> > common factor.
> >
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
> >
>
> After I run some other tests, I am going to re-run this test and see if it
> OOPSes again with PREEMPT off.
Strange. The below debug patch might catch it - please run with this
applied.
--- a/arch/i386/mm/highmem.c~kmap_atomic-debugging
+++ a/arch/i386/mm/highmem.c
@@ -30,7 +30,43 @@ void *kmap_atomic(struct page *page, enu
{
enum fixed_addresses idx;
unsigned long vaddr;
+ static unsigned warn_count = 10;
+ if (unlikely(warn_count == 0))
+ goto skip;
+
+ if (unlikely(in_interrupt())) {
+ if (in_irq()) {
+ if (type != KM_IRQ0 && type != KM_IRQ1 &&
+ type != KM_BIO_SRC_IRQ && type != KM_BIO_DST_IRQ &&
+ type != KM_BOUNCE_READ) {
+ WARN_ON(1);
+ warn_count--;
+ }
+ } else if (!irqs_disabled()) { /* softirq */
+ if (type != KM_IRQ0 && type != KM_IRQ1 &&
+ type != KM_SOFTIRQ0 && type != KM_SOFTIRQ1 &&
+ type != KM_SKB_SUNRPC_DATA &&
+ type != KM_SKB_DATA_SOFTIRQ &&
+ type != KM_BOUNCE_READ) {
+ WARN_ON(1);
+ warn_count--;
+ }
+ }
+ }
+
+ if (type == KM_IRQ0 || type == KM_IRQ1 || type == KM_BOUNCE_READ) {
+ if (!irqs_disabled()) {
+ WARN_ON(1);
+ warn_count--;
+ }
+ } else if (type == KM_SOFTIRQ0 || type == KM_SOFTIRQ1) {
+ if (irq_count() == 0 && !irqs_disabled()) {
+ WARN_ON(1);
+ warn_count--;
+ }
+ }
+skip:
/* even !CONFIG_PREEMPT needs this, for in_atomic in do_page_fault */
pagefault_disable();
if (!PageHighMem(page))
_
next prev parent reply other threads:[~2007-01-26 9:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-20 12:23 Justin Piszcz
2007-01-20 12:46 ` Justin Piszcz
2007-01-22 21:01 ` Chuck Ebbert
2007-01-22 21:59 ` Neil Brown
2007-01-23 1:44 ` Dan Williams
2007-01-23 2:06 ` Neil Brown
2007-01-23 10:56 ` Justin Piszcz
2007-01-23 11:08 ` Michael Tokarev
2007-01-23 11:59 ` Justin Piszcz
2007-01-23 12:48 ` Michael Tokarev
2007-01-23 13:46 ` Justin Piszcz
2007-01-24 23:37 ` Justin Piszcz
2007-01-26 9:25 ` Andrew Morton [this message]
2007-01-26 9:37 ` Justin Piszcz
2007-01-26 12:31 ` Justin Piszcz
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=20070126012505.d8cb07f2.akpm@osdl.org \
--to=akpm@osdl.org \
--cc=cebbert@redhat.com \
--cc=jpiszcz@lucidpixels.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-raid@vger.kernel.org \
--cc=neilb@suse.de \
--cc=xfs@oss.sgi.com \
--subject='Re: Kernel 2.6.19.2 New RAID 5 Bug (oops when writing Samba -> RAID5)' \
/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
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).