[BUG] Re: [broken-out-2007-07-20-00-22] kernel bug at kernel/params:570

Satyam Sharma
2007-07-21T06:39:29Z

On 7/21/07, Satyam Sharma <satyam.sharma@gmail.com> wrote:
> [...]
> %eax == ffffffea == -22 == -EINVAL.
>
> But:
>
> When I replace the BUG_ON() with Greg's (or my modified) patch,
> the kernel ignores that error as we wanted, but _still_ crashes before
> finding the root block device (because ATA is not in kernel and my
> system seems to require it). Unfortunately, lots of dmesg output
> has scrolled up by then, and our "printk" is lost. Because of no
> CONFIG_ATA, nothing gets written to disk either.

The following hack worked:

if (ret) {
printk("~~~~~ .%s.%d.%s. ~~~~~\n", name, ret, kparam->name);
for (;;)
cpu_relax();
}

So I just hung my testbox at the point the info I wanted was printed out :-)

I hand-copied the following from the screen:

*****

The kobject at, or inside cpu_devices+0x10/0xe0 is not dynamically
allocated.
The kobject at, or inside cpu_devices+0x10/0xe0 is not dynamically
allocated. (printed twice)
WARNING: at lib/kobject.c:220 kobject_shadow_add()
...
show_trace
dump_stack
...
kobject_shadow_add+0x65/0x1b6
kobject_add
kernel_param_sysfs_setup
param_sysfs_init
...
...

~~~~~ ..-22.mtrr.show. ~~~~~

*****

Something wrong with "cpu_devices" and "mtrr.show" in 22-mm1 me thinks.
Wonder if latest -git is already fixed? Spent 4 hours on this, at least :-p

BTW "kobject at, or inside cpu_devices+0x10/0xe0 is not dynamically
allocated" sounds like something that could, and should, have been
caught at build time ...

Satyam