Re: More on 2.1.129 oops

Philipp Rumpf (prumpf@jcsbs.lanobis.de)
Mon, 23 Nov 1998 01:11:27 +0100


On Mon, Nov 23, 1998 at 10:17:38AM +1100, Richard Gooch wrote:
> Hi, Philipp. Your analysis looks spot on.
>
> Obviously this patch can't go into Linus' kernel since it is x86
> specific, but it demonstrates the point.

> Linus: do you prefer a solution like the one I've appended, or an
> optional semaphore? Personally, I like the semaphore idea, as it's
> more flexible.

We had to decrement the semaphore (actually, it was an usecount for
this region of code) at the beginning of bdflush and kflushd, which
would not be very flexible.

I think some wrapper function in the non-init sections would be the
thing to do, as it could be architecture-independent and could be
useful as it allowed to let the functions now called by kernel_thread
to return (look into drivers/scsi/host.c for an example).

> - pid = kernel_thread(do_linuxrc, "/linuxrc", SIGCHLD);
> + pid = kernel_thread2(do_linuxrc, "/linuxrc", SIGCHLD);

This is not necessary, as we wait for the thread to finish anyway.

> if (pid>0)
> while (pid != wait(&i));

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/