tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Kernel panic in "subr_xcall.c"



Jason Thorpe wrote:
On Oct 19, 2009, at 1:23 AM, Matthias Scheler wrote:

On Mon, Oct 19, 2009 at 09:05:43AM +0100, Matthias Scheler wrote:
Ok, I think I found the problem:

1.) pool_cache_invalidate() calls xc_broadcast() with ci = NULL.
2.) xc_broadcast() calls xc_lowpri() with ci = NULL.
3.) xc_lowpri() iterates over all CPUs but doesn't fine any
   running CPU and therefore doesn't schedule any cross calls.
4.) The KASSERT() at the end of loop in xc_lowpri() triggers
   because "xc_tailp" and "xc_headp" are both zero.

The following patch avoids the problem:
Here is a slightly better patch:

I like this patch, and considered this approach myself before Jean-Yves checked 
in the other one to subr_pool.c.
It has the nice effect of not requiring every consumer of cross-calls to be 
aware of the bootstrap issue.

Indeed; the only problem I found with this patch is that the function will not be called by the bound xc_thread of the CPU, but rather directly (different from a call to xc_lowpri() for a specific CPU).

If you think that pushing the solution deeper is cleaner, I am not against it, on the contrary.

--
Jean-Yves Migeon
jeanyves.migeon%free.fr@localhost


Home | Main Index | Thread Index | Old Index