Kernel panic - not syncing: Attempted to kill init!

史星星(研六 福州) shixingxing at ruijie.com.cn
Tue Jul 12 22:57:31 EDT 2011


Hi,
         I got a problem when trying to boot linux 2.6.32.13 on my Octeon CN5650 board.
Booting logs below:
...omit….
EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
kjournald starting.  Commit interval 5 seconds
EXT3 FS on mtdblock1, internal journal
EXT3-fs: recovery complete.
EXT3-fs: mounted filesystem with ordered data mode.
VFS: Mounted root (ext3 filesystem) on device 31:1.
Freeing unused kernel memory: 176k freed
Kernel panic - not syncing: Attempted to kill init!     <-- kernel panic here

What I do:
1、The busybox init is OK in another version kernel .I replace init with “Hello world” prog or dead loop prog, kernel panic still.
2、
run_init_process(“/sbin/init”) --> kernel_execve --> sys_execve
so I add some debug msgs in sys_execve.

asmlinkage int sys_execve(nabi_no_regargs struct pt_regs regs)
{
         int error;
         char * filename;

    printk("enter sys_execve\n");
         filename = getname((char __user *) (long)regs.regs[4]);
         error = PTR_ERR(filename);
         if (IS_ERR(filename))
                   goto out;
         error = do_execve(filename, (char __user *__user *) (long)regs.regs[5],
                           (char __user *__user *) (long)regs.regs[6], &regs);
    putname(filename);
    printk("out sys_execve\n");
out:
         return error;
}

Boot logs:
VFS: Mounted root (ext3 filesystem) on device 31:1.
Freeing unused kernel memory: 176k freed
enter sys_execve
out sys_execve
Kernel panic - not syncing: Attempted to kill init!     <-- kernel panic here

My question:
1.the kernel panic happened when return to userspace prog?
2.how to solve this problem?

Thank you!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110713/134a2b2b/attachment-0001.html 


More information about the Kernelnewbies mailing list