Re: [RFC PATCH 1/3] Add ability to keep track of callers of symbol_(get|put)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Trent Piepho
Date: Monday, March 12, 2007 - 11:33 pm

On Tue, 13 Mar 2007, Rusty Russell wrote:

Ok, I did that before, I'll change it back.

Note that the reference counting isn't perfect when it comes to catching
mistakes.

The fundamental problem is that when a module is loaded and linked, all the
modules that it used symbols from gain a "use".  To be symmetric, when a
module is unloaded all the modules it used symbols from should lose a
"use".  Except, there is no record of what modules gained a "use" at link
time.  Suppose module 1 uses a symbol from module 2.  At link time, a
module_use that "1 uses 2" is created.  Now say 1 does a symbol_put() on
something in 2, with no matching get.  The "1 uses 2" goes away.  When 1 is
unloaded, there is no way to tell that "1 uses 2", deleted by the extra
put, is missing.

If it's wanted, I think I could fix this.  I'd have a separate count of
static uses vs dynamic uses.
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 1/3] Add ability to keep track of callers of sy ..., Mauro Carvalho Chehab, (Fri Mar 9, 9:31 pm)
Re: [RFC PATCH 1/3] Add ability to keep track of callers o ..., Trent Piepho, (Mon Mar 12, 11:33 pm)