Re: [PATCH] show_trace() module_end = 0?

Andrew Morton (akpm@zip.com.au)
Fri, 03 Aug 2001 12:52:41 +1000


Hugh Dickins wrote:
>
> > The other, minor problem is that we should walk the module_list under
> > lock_kernel() only, but I wasn't brave enough to add this to the
> > show_trace() code path.
>
> I think it's just modlist_lock you'd need. Not sure whether better
> to try for it or ignore it. CC'ed Andrew "spinlock-buster" Morton
> for his opinion.

Debugging things like show_trace() may be called from any context
at all, and hence really cannot take locks. We just live with the
race possibilities.

One could possibly play games with spin_trylock, but I don't expect
it'd help much - if you failed to get the lock what can you do?

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