Rusty Russell wrote:
> On Monday 21 April 2008 22:34:39 Peter Oberparleiter wrote:
>> From: Peter Oberparleiter <[EMAIL PROTECTED]>
>>
>> module_address() maps an address to the module containing it in either
>> text or data section. Required by the gcov profiling infrastructure to
>> associate profiling data structures with modules.
> 
> Locking problem; this isn't safe.  Note that we block preemption to traverse 
> the module list.  You could grab a reference, and fix up all the callers to 
> put it once they're done?

Hm, problem: in this patchset, module_address() is called when the module is 
going (mod->state = MODULE_STATE_GOING) and try_module_get() would most likely 
fail and/or make no sense since we're already past reference counting with this 
module anyway.

On the other hand, what I actually need is a way to find out if a given module 
contains a certain address so I could replace this function with something like 
module_contains(mod, addr). 
I'll go that route if there are no objections.


Regards,
  Peter

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list

Reply via email to