From: Dave Hansen <haveblue@us.ibm.com>
To: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Tilman Schmidt <tilman@imap.cc>,
Andrew Morton <akpm@linux-foundation.org>,
linux-kernel@vger.kernel.org, Thomas Renninger <trenn@suse.de>,
Len Brown <len.brown@intel.com>,
Linus Torvalds <torvalds@osdl.org>,
Christoph Hellwig <hch@infradead.org>,
Markus Gaugusch <dsdt@gaugusch.at>,
linux-acpi@vger.kernel.org, Al Viro <viro@ZenIV.linux.org.uk>,
Arjan van de Ven <arjanv@redhat.com>
Subject: Re: [2.6.25-rc5-mm1] BUG: spinlock bad magic early during boot
Date: Fri, 14 Mar 2008 16:29:55 -0700 [thread overview]
Message-ID: <1205537395.8167.31.camel@nimitz.home.sr71.net> (raw)
In-Reply-To: <47DB013D.3060102@tremplin-utc.net>
On Fri, 2008-03-14 at 23:50 +0100, Eric Piel wrote:
> > It'd be a shame to have to have "super_early_fs_initcall()" logic for
> > every part of the VFS or any other initcall for that matter that you
> > might need. How do we tell all future VFS hackers that they have to do
> > this so that the next guy doesn't break it? I certainly missed it. :)
> Well, my point was that actually populate_rootfs() does _very_ little
> with regard to FS manipulation, acpi_find_dsdt_initrd() even less. The
> task of checking that everything needed is available beforehand is
> certainly not the same magnitude as the one of the Danaides as you
> seemed to implied ;-)
The problem is defining how much "very little" is, and making sure that
all the other kernel developers agree with you on it.
Anyway, I'm sick of too much bitching and too little coding. Andrew,
here's a patch for -mm that will at least shut up the spinlock warnings.
Al, you'll also need something similar to this for when you get Linus to
pull your git tree that has the r/o bind mount patches.
It's a hack, but I don't know any better way to do it until the ACPI
mess gets cleaned up.
Arjan, is there a way to statically set lockdep classes for a spinlock
that I'm missing?
I'll leave it to everyone else to describe the evils of calling into
*any* fs code before the fs initcalls have been made.
-- Dave
I'm not happy with this patch, but I don't see an easier way
to do it. We can't statically initialize the lockdep classes
as far as I can see.
---
linux-2.6.git-dave/fs/namespace.c | 3 +--
linux-2.6.git-dave/include/linux/mount.h | 1 +
linux-2.6.git-dave/init/main.c | 8 ++++++++
3 files changed, 10 insertions(+), 2 deletions(-)
diff -puN fs/namei.c~robind-statically-initialize-locks fs/namei.c
diff -puN fs/namespace.c~robind-statically-initialize-locks fs/namespace.c
--- linux-2.6.git/fs/namespace.c~robind-statically-initialize-locks 2008-03-14 16:12:44.000000000 -0700
+++ linux-2.6.git-dave/fs/namespace.c 2008-03-14 16:16:43.000000000 -0700
@@ -158,7 +158,7 @@ struct mnt_writer {
} ____cacheline_aligned_in_smp;
static DEFINE_PER_CPU(struct mnt_writer, mnt_writers);
-static int __init init_mnt_writers(void)
+int __init init_mnt_writers(void)
{
int cpu;
for_each_possible_cpu(cpu) {
@@ -169,7 +169,6 @@ static int __init init_mnt_writers(void)
}
return 0;
}
-fs_initcall(init_mnt_writers);
static void unlock_mnt_writers(void)
{
diff -puN init/main.c~robind-statically-initialize-locks init/main.c
--- linux-2.6.git/init/main.c~robind-statically-initialize-locks 2008-03-14 16:13:02.000000000 -0700
+++ linux-2.6.git-dave/init/main.c 2008-03-14 16:17:33.000000000 -0700
@@ -58,6 +58,7 @@
#include <linux/kthread.h>
#include <linux/sched.h>
#include <linux/signal.h>
+#include <linux/mount.h>
#include <asm/io.h>
#include <asm/bugs.h>
@@ -650,6 +651,13 @@ asmlinkage void __init start_kernel(void
check_bugs();
+ /*
+ * This is a horrible hack. The ACPI code needs
+ * to learn how to do "DSDT override" without fs
+ * access or do it later in boot - Dave Hansen
+ */
+ init_mnt_writers();
+
populate_rootfs(); /* For DSDT override from initramfs */
acpi_early_init(); /* before LAPIC and SMP init */
diff -puN include/linux/mount.h~robind-statically-initialize-locks include/linux/mount.h
--- linux-2.6.git/include/linux/mount.h~robind-statically-initialize-locks 2008-03-14 16:16:04.000000000 -0700
+++ linux-2.6.git-dave/include/linux/mount.h 2008-03-14 16:16:34.000000000 -0700
@@ -79,6 +79,7 @@ static inline struct vfsmount *mntget(st
return mnt;
}
+extern int init_mnt_writers(void);
extern int mnt_want_write(struct vfsmount *mnt);
extern void mnt_drop_write(struct vfsmount *mnt);
extern void mntput_no_expire(struct vfsmount *mnt);
_
next prev parent reply other threads:[~2008-03-14 23:30 UTC|newest]
Thread overview: 116+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-11 8:14 2.6.25-rc5-mm1 Andrew Morton
2008-03-11 10:16 ` [Build Faliure] 2.6.25-rc5-mm1 build fails Kamalesh Babulal
2008-03-11 10:56 ` Edward Shishkin
2008-03-11 12:55 ` [Build Failure] 2.6.25-rc5-mm1 Build fails with allmodconfig probe_4drives undefined Kamalesh Babulal
2008-03-11 17:41 ` Andrew Morton
2008-03-11 19:35 ` Bartlomiej Zolnierkiewicz
2008-03-11 18:19 ` Andrew Morton
2008-03-11 19:36 ` Bartlomiej Zolnierkiewicz
2008-03-11 17:09 ` 2.6.25-rc5-mm1 (paravirt/vsmp/no PCI) Randy Dunlap
2008-03-11 18:18 ` Jeremy Fitzhardinge
2008-03-12 0:10 ` Ravikiran G Thirumalai
2008-03-12 1:42 ` Randy Dunlap
2008-03-12 1:51 ` Jeremy Fitzhardinge
2008-03-12 7:14 ` Ingo Molnar
2008-03-11 20:23 ` 2.6.25-rc5-mm1 serge
2008-03-11 20:39 ` 2.6.25-rc5-mm1 Andrew Morton
2008-03-12 19:33 ` 2.6.25-rc5-mm1 Torsten Kaiser
2008-03-12 19:44 ` 2.6.25-rc5-mm1 Andrew Morton
2008-03-12 20:01 ` 2.6.25-rc5-mm1 Torsten Kaiser
2008-03-13 22:05 ` 2.6.25-rc5-mm1 Torsten Kaiser
2008-03-13 22:35 ` 2.6.25-rc5-mm1 Andrew Morton
2008-03-13 23:10 ` 2.6.25-rc5-mm1 Badari Pulavarty
2008-03-21 12:12 ` 2.6.25-rc5-mm1 Ingo Molnar
2008-03-12 1:14 ` 2.6.25-rc5-mm1 Dave Young
2008-03-12 7:21 ` 2.6.25-rc5-mm1: NO_HZ=Y && PREEMPT_RCU=Y fails to build Laurent Riffard
2008-03-12 7:44 ` Andrew Morton
2008-03-12 21:32 ` Laurent Riffard
2008-03-12 23:43 ` Tilman Schmidt
2008-03-12 9:17 ` [BUILD_FAILURE] 2.6.25-rc5-mm1 build fails at startup_ipi_hook() with randconfig Kamalesh Babulal
2008-03-12 12:55 ` [BUG] 2.6.25-rc5-mm1 kernel panic with "Exception: 501 " on powerpc Kamalesh Babulal
2008-03-12 17:46 ` Andrew Morton
2008-03-12 17:51 ` Matthew Wilcox
2008-03-12 22:26 ` Michael Ellerman
2008-03-12 22:33 ` Matthew Wilcox
2008-03-13 13:02 ` Kamalesh Babulal
2008-03-12 20:40 ` Benjamin Herrenschmidt
2008-03-12 18:14 ` Badari Pulavarty
2008-03-12 18:10 ` 2.6.25-rc5-mm1 - x86_64 boot problem ? Badari Pulavarty
2008-03-12 18:15 ` Andrew Morton
2008-03-13 17:09 ` 2.6.25-rc5-mm1 - x86_64 boot problem with git-sched.patch Badari Pulavarty
2008-03-13 17:40 ` Badari Pulavarty
2008-03-13 17:55 ` Guillaume Chazarain
2008-03-13 18:20 ` Badari Pulavarty
2008-03-12 23:54 ` [2.6.25-rc5-mm1] BUG: spinlock bad magic early during boot Tilman Schmidt
2008-03-13 0:04 ` Andrew Morton
2008-03-13 21:48 ` Dave Hansen
2008-03-13 20:46 ` Dave Hansen
2008-03-14 0:35 ` Tilman Schmidt
2008-03-14 18:03 ` Dave Hansen
2008-03-14 20:06 ` Dave Hansen
2008-03-14 20:20 ` Linus Torvalds
2008-03-14 20:51 ` Eric Piel
2008-03-14 21:35 ` Dave Hansen
2008-03-14 22:50 ` Eric Piel
2008-03-14 23:29 ` Dave Hansen [this message]
2008-03-15 12:47 ` Tilman Schmidt
2008-03-15 19:21 ` Linus Torvalds
2008-03-15 19:42 ` Éric Piel
2008-03-15 20:19 ` Linus Torvalds
2008-03-16 0:15 ` Éric Piel
2008-03-17 17:27 ` Len Brown
[not found] ` <1205858252.21619.233.camel@queen.suse.de>
2008-03-18 20:32 ` Len Brown
2008-03-20 14:28 ` Thomas Renninger
2008-03-17 17:59 ` Len Brown
2008-03-21 13:17 ` Pavel Machek
2008-03-23 16:00 ` Dave Hansen
2008-03-24 16:03 ` Pavel Machek
2008-03-24 17:05 ` Eric Piel
2008-03-24 17:19 ` Pavel Machek
2008-03-24 17:23 ` Dave Hansen
2008-03-27 9:23 ` Helge Hafting
2008-03-17 18:05 ` Len Brown
2008-03-16 20:11 ` Dave Hansen
2008-03-17 12:23 ` Peter Zijlstra
2008-03-19 23:50 ` Tilman Schmidt
2008-03-17 17:48 ` Len Brown
2008-03-13 0:15 ` [2.6.25-rc5-mm1] WARNING: at drivers/base/sys.c:173 Tilman Schmidt
2008-03-13 18:34 ` Greg KH
2008-03-13 19:57 ` Dave Jones
2008-03-13 19:56 ` Dave Jones
2008-03-13 20:27 ` Greg KH
2008-03-14 0:01 ` Tilman Schmidt
2008-03-14 0:44 ` Dave Jones
2008-03-14 0:57 ` Zhao Yakui
2008-03-14 9:58 ` Tilman Schmidt
2008-03-15 12:16 ` Tilman Schmidt
2008-03-13 14:03 ` 2.6.25-rc5-mm1 shutdown crash Helge Hafting
2008-03-13 16:12 ` Andrew Morton
2008-03-25 12:23 ` Helge Hafting
2008-03-13 19:48 ` [2.6.25-rc5-mm1] regression: cannot run Postfix sendmail command as non-root Tilman Schmidt
2008-03-13 22:21 ` Daniel Lezcano
2008-03-14 0:08 ` Tilman Schmidt
2008-03-17 10:44 ` Daniel Lezcano
2008-03-17 12:50 ` Benjamin Thery
2008-03-17 13:35 ` Tilman Schmidt
2008-03-17 13:06 ` Tilman Schmidt
2008-03-17 13:17 ` Daniel Lezcano
2008-03-19 17:52 ` Benjamin Thery
2008-03-19 21:16 ` Andrew Morton
2008-03-19 22:14 ` Benjamin Thery
2008-03-19 22:49 ` David Miller
2008-03-20 8:26 ` Benjamin Thery
2008-03-20 10:21 ` Rafael J. Wysocki
2008-03-20 12:52 ` Pavel Emelyanov
2008-03-20 13:48 ` Benjamin Thery
2008-03-20 14:38 ` Rafael J. Wysocki
2008-03-19 23:31 ` Tilman Schmidt
2008-03-13 22:07 ` 2.6.25-rc5-mm1: "consolechars" hangs on boot Laurent Riffard
2008-03-13 22:38 ` Andrew Morton
2008-03-14 5:26 ` Oleg Nesterov
2008-03-14 21:06 ` Laurent Riffard
2008-03-15 12:03 ` Oleg Nesterov
2008-03-16 21:38 ` 2.6.25-rc5-mm1 build failure of pcsp.c Mariusz Kozlowski
2008-03-28 22:52 ` 2.6.25-rc5-mm1 sparc64 boot problems due to generic pci_enable_resources() Mariusz Kozlowski
2008-03-28 23:10 ` David Miller
2008-03-29 0:44 ` Benjamin Herrenschmidt
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=1205537395.8167.31.camel@nimitz.home.sr71.net \
--to=haveblue@us.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=arjanv@redhat.com \
--cc=dsdt@gaugusch.at \
--cc=eric.piel@tremplin-utc.net \
--cc=hch@infradead.org \
--cc=len.brown@intel.com \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=tilman@imap.cc \
--cc=torvalds@osdl.org \
--cc=trenn@suse.de \
--cc=viro@ZenIV.linux.org.uk \
/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
all inboxes | Powered by JetHome®