From: Chuck Ebbert <cebbert@redhat.com>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Jeremy Fitzhardinge <jeremy@goop.org>, Andi Kleen <ak@muc.de>
Subject: i386 doublefault handler is broken with CONFIG_DEBUG_SPINLOCK
Date: Thu, 09 Aug 2007 12:49:29 -0400 [thread overview]
Message-ID: <46BB4599.2020900@redhat.com> (raw)
The new percpu code has apparently broken the doublefault handler
when CONFIG_DEBUG_SPINLOCK is set. Doublefault is handled by
a hardware task, making the check
SPIN_BUG_ON(lock->owner == current, lock, "recursion");
fault because it uses the FS register to access the percpu data
for current, and that register is zero in the new TSS. (The trace
I saw was on 2.6.20 where it was GS, but it looks like this will
still happen with FS on 2.6.22.)
Initializing FS in the doublefault_tss should fix it.
Signed-off-by: Chuck Ebbert <cebbert@redhat.com>
---
NOTE: not even compile tested.
arch/i386/kernel/doublefault.c | 1 +
1 file changed, 1 insertion(+)
--- linux-2.6.22.noarch.orig/arch/i386/kernel/doublefault.c
+++ linux-2.6.22.noarch/arch/i386/kernel/doublefault.c
@@ -63,6 +63,7 @@ struct tss_struct doublefault_tss __cach
.cs = __KERNEL_CS,
.ss = __KERNEL_DS,
.ds = __USER_DS,
+ .fs = __KERNEL_PERCPU,
.__cr3 = __pa(swapper_pg_dir)
}
next reply other threads:[~2007-08-09 16:49 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-08-09 16:49 Chuck Ebbert [this message]
2007-08-09 17:49 ` i386 doublefault handler is broken with CONFIG_DEBUG_SPINLOCK Andi Kleen
2007-08-09 18:40 ` Chuck Ebbert
2007-08-09 19:00 ` Jeremy Fitzhardinge
2007-08-09 23:16 ` Andi Kleen
2007-08-09 23:35 ` Chuck Ebbert
2007-08-10 8:23 ` Andi Kleen
2007-08-10 19:11 ` Chuck Ebbert
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=46BB4599.2020900@redhat.com \
--to=cebbert@redhat.com \
--cc=ak@muc.de \
--cc=jeremy@goop.org \
--cc=linux-kernel@vger.kernel.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