diff options
author | Keshavamurthy Anil S <anil.s.keshavamurthy@intel.com> | 2006-01-11 12:17:41 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-11 18:42:12 -0800 |
commit | df019b1d8b893d0f0ee5a9b0f71486f0892561ae (patch) | |
tree | 9d2ced14291502af1ca687b5d854d8394cbfb84d /include/linux/kprobes.h | |
parent | ef43bc4fc32bec8fda7bae8948b774616dc9e496 (diff) | |
download | linux-rpi3-df019b1d8b893d0f0ee5a9b0f71486f0892561ae.tar.gz linux-rpi3-df019b1d8b893d0f0ee5a9b0f71486f0892561ae.tar.bz2 linux-rpi3-df019b1d8b893d0f0ee5a9b0f71486f0892561ae.zip |
[PATCH] kprobes: fix unloading of self probed module
When a kprobes modules is written in such a way that probes are inserted on
itself, then unload of that moudle was not possible due to reference
couning on the same module.
The below patch makes a check and incrementes the module refcount only if
it is not a self probed module.
We need to allow modules to probe themself for kprobes performance
measurements
This patch has been tested on several x86_64, ppc64 and IA64 architectures.
Signed-off-by: Anil S Keshavamurthy <anil.s.keshavamurthy>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'include/linux/kprobes.h')
-rw-r--r-- | include/linux/kprobes.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 10005bc92a31..669756bc20a2 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h @@ -68,6 +68,9 @@ struct kprobe { /* list of kprobes for multi-handler support */ struct list_head list; + /* Indicates that the corresponding module has been ref counted */ + unsigned int mod_refcounted; + /*count the number of times this probe was temporarily disarmed */ unsigned long nmissed; |