2000-11-24 19:20:29

by Pavel Machek

[permalink] [raw]
Subject: do_initcalls bug

Hi!

static void __init do_initcalls(void)
{
initcall_t *call;

call = &__initcall_start;
do {
early_printk("[%lx]\n", call);
(*call)();
call++;
} while (call < &__initcall_end);
}

In case there are no initcalls to be called, it just simply
crashes. Ouch.

Pavel
--
I'm [email protected]. "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at [email protected]


2000-11-24 19:23:09

by Alan

[permalink] [raw]
Subject: Re: do_initcalls bug

> static void __init do_initcalls(void)
> {
> initcall_t *call;
>
> call = &__initcall_start;
> do {
> early_printk("[%lx]\n", call);
> (*call)();
> call++;
> } while (call < &__initcall_end);
> }
>
> In case there are no initcalls to be called, it just simply
> crashes. Ouch.

Known problem. Fixed in 2.2.x. Linus didn't want to take the patches because
2.4 'always had initcalls'