[klibc] problems when exec()ing /sbin/init from an initramfs
Martin Hicks
mort at bork.org
Mon Dec 1 13:22:45 PST 2003
On Sun, 2003-11-30 at 15:18, Bryan O'Sullivan wrote:
> On Sun, 2003-11-30 at 11:50, Martin Hicks wrote:
>
> > Investigating will continue...
>
> Can you get a sysrq-t dump from the kernel after the hang? This may
> indicate what's up.
>
sysrq-t didn't give anything useful. I tracked it down.
It's spinning in the loop in fs/namespace.c::check_mnt()
Here's some useful debug output:
mnt->mnt_devname = /udev/xscsi/pci20.01.1-1/target2/lun0/part2
mnt->mnt_parent->mnt_devname = rootfs
spin mnt(e0000040401bc380) mnt_parent(e0000040401bc980)
spin mnt(e0000040401bc980) mnt_parent(e0000040401bc380)
spin mnt(e0000040401bc380) mnt_parent(e0000040401bc980)
spin mnt(e0000040401bc980) mnt_parent(e0000040401bc380)
spin mnt(e0000040401bc380) mnt_parent(e0000040401bc980)
spin mnt(e0000040401bc980) mnt_parent(e0000040401bc380)
spin mnt(e0000040401bc380) mnt_parent(e0000040401bc980)
Here's my modified function:
static int check_mnt(struct vfsmount *mnt)
{
printk("mnt->mnt_devname = %s\n", mnt->mnt_devname);
printk("mnt->mnt_parent->mnt_devname = %s\n", mnt->mnt_parent->mnt_devname);
spin_lock(&vfsmount_lock);
while (mnt->mnt_parent != mnt) {
printk(KERN_CRIT "spin mnt(%p) mnt_parent(%p)\n", mnt, mnt->mnt_parent);
mnt = mnt->mnt_parent;
}
spin_unlock(&vfsmount_lock);
return mnt == current->namespace->root;
}
The problem, clearly, is that this circular "parent" link must go away.
I'm not sure which one is right, but I suspect that mnt_parent for my
stupid device name ("/udev/xscsi/pci20.01.1-1/target2/lun0/part2")
should be rootfs and mnt_parent of rootfs should be rootfs.
Wrong?
mh
--
Martin Hicks || mort at bork.org || PGP/GnuPG: 0x4C7F2BEE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://www.zytor.com/pipermail/klibc/attachments/20031201/c77252f5/attachment.bin
More information about the klibc
mailing list