From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: ltp-list@lists.sourceforge.net,
Andrew Morton <akpm@linux-foundation.org>,
ltp-coverage@lists.sourceforge.net, linux-kernel@vger.kernel.org
Subject: Re: [Ltp-coverage] [RFC PATCH 5/8] module: add function to map address to containing module
Date: Tue, 22 Apr 2008 14:40:42 +0200 [thread overview]
Message-ID: <480DDCCA.4010709@de.ibm.com> (raw)
In-Reply-To: <200804220140.58784.rusty@rustcorp.com.au>
Rusty Russell wrote:
> On Monday 21 April 2008 22:34:39 Peter Oberparleiter wrote:
>> From: Peter Oberparleiter <peter.oberparleiter@de.ibm.com>
>>
>> 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
prev parent reply other threads:[~2008-04-22 12:40 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-21 12:34 [RFC PATCH 5/8] module: add function to map address to containing module Peter Oberparleiter
2008-04-21 15:40 ` Rusty Russell
2008-04-22 12:40 ` Peter Oberparleiter [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=480DDCCA.4010709@de.ibm.com \
--to=peter.oberparleiter@de.ibm.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=ltp-coverage@lists.sourceforge.net \
--cc=ltp-list@lists.sourceforge.net \
--cc=rusty@rustcorp.com.au \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.