archive mirror
 help / color / mirror / Atom feed
* 2.4.22-pre6 race condition during boot hoses up stat("/")?
@ 2003-07-16 22:29 Erik Andersen
  0 siblings, 0 replies; only message in thread
From: Erik Andersen @ 2003-07-16 22:29 UTC (permalink / raw)
  To: linux-kernel

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

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,
    ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdc: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) 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 B. Andersen   
--This message was written using 73% post-consumer electrons--

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2003-07-16 22:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-16 22:29 2.4.22-pre6 race condition during boot hoses up stat("/")? Erik Andersen

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).