From: Erik Andersen <andersen@codepoet.org>
To: linux-kernel <linux-kernel@vger.kernel.org>
Subject: 2.4.22-pre6 race condition during boot hoses up stat("/")?
Date: Wed, 16 Jul 2003 16:29:15 -0600 [thread overview]
Message-ID: <20030716222914.GA15938@codepoet.org> (raw)
I recently obtained a P4 and have started building the kernel
with SMP enabled (for hyper-threading). I have started noticing
some sortof wierd race with mounting root with an Intel ICH5 ide
controller...
Normally doing a stat("/", &buf) gives me the correct st_rdev for
my root device. But every few boots I find that st_rdev is
instead set to the st_rdev of the last IDE device under /proc/ide
that happens to be using the ide-disk driver..
Busybox has a find_real_root_device_name() function which depends
upon stat("/") giving the correct st_rdev, and this bug causes it
to do wierd things.
So for example, when booting I see this:
PCI: Enabling device 00:1f.1 (0005 -> 0007)
ICH5: chipset revision 2
ICH5: not 100% native mode: will probe irqs later
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hda:DMA,
hdb:DMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc:DMA,
hdd:DMA
hda: IC35L080AVVA07-0, ATA DISK drive
hdb: WDC AC32500H, ATA DISK drive
My root_fs is on /dev/hda2.
But when running the debugger I see....
38 if (stat("/", &rootStat) != 0)
(gdb)
(gdb) p rootStat.st_rdev
$1 = 832
(gdb) p (832 >> 8) & 0xff
$2 = 3
(gdb) p 832 & 0xff
$3 = 64
Which works out to major 3, minor 64, or /dev/hdb!!!
I've attempted to track down where such a problem could
occur, but so far I've come up empty.
-Erik
--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
reply other threads:[~2003-07-16 22:17 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=20030716222914.GA15938@codepoet.org \
--to=andersen@codepoet.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;
as well as URLs for NNTP newsgroup(s).