[linux-dvb] idea on how to break the static dependencies on demodulator modules

Trent Piepho xyzzy at speakeasy.org
Fri Apr 28 20:04:31 CEST 2006

On Fri, 28 Apr 2006, Johannes Stezenbach wrote:
> On Fri, Apr 28, 2006, Trent Piepho wrote:
> > But....  There are no users of symbol_put_addr(), and there is a reason!  Ever
> > since this patch:
> >
> > Fix race between CONFIG_DEBUG_SLABALLOC and modules
> > Sun, 27 Jun 2004 17:55:19 +0000 (17:55 +0000)
> > http://www.kernel.org/git/?p=linux/kernel/git/torvalds/old-2.6-bkcvs.git;a=commit;h=92b3db26d31cf21b70e3c1eadc56c179506d8fbe
> >
> > using symbol_put_addr() will hang your kernel.  So, probably best not to use
> > it.
> Hm, that is not abvious to me from looking at the patch.
> Have you tried it?

Yep, I tried it just to be sure, and it locked my kernel.  It's pretty
obvious if you look at the code for symbol_put_addr(), not so obvious
from the patch.  symbol_put_addr() acquires the modlist_lock spinlock,
then calls kernel_text_address() and module_text_address() while it
still holds the lock.  That patch changed those two functions so they
ALSO try to acquire the spinlock.  Some of the users of those
functions already held the lock too, and were changed to call the
"double-underscore" versions that don't lock, but symbol_put_addr()
was missed.

I haven't reported it yet, but I intend to submit a patch soon.

More information about the linux-dvb mailing list