mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[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>
This commit is contained in:
parent
ef43bc4fc3
commit
df019b1d8b
2 changed files with 35 additions and 10 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue