diff options
author | Alexey Dobriyan <adobriyan@sw.ru> | 2007-05-08 03:28:41 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:08 -0400 |
commit | ffb45122766db220d0bf3d01848d575fbbcb6430 (patch) | |
tree | a8fedf0518407ad12578a7c03aa2c3344f11ff3c /kernel/kprobes.c | |
parent | ea07890a680273b25127129fb555aac0d9324bea (diff) |
Simplify kallsyms_lookup()
Several kallsyms_lookup() pass dummy arguments but only need, say, module's
name. Make kallsyms_lookup() accept NULLs where possible.
Also, makes picture clearer about what interfaces are needed for all symbol
resolving business.
Signed-off-by: Alexey Dobriyan <adobriyan@sw.ru>
Cc: Rusty Russell <rusty@rustcorp.com.au>
Acked-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/kprobes.c')
-rw-r--r-- | kernel/kprobes.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kernel/kprobes.c b/kernel/kprobes.c index 0207045b4f6f..bee29bde6adf 100644 --- a/kernel/kprobes.c +++ b/kernel/kprobes.c | |||
@@ -868,13 +868,13 @@ static int __kprobes show_kprobe_addr(struct seq_file *pi, void *v) | |||
868 | struct kprobe *p, *kp; | 868 | struct kprobe *p, *kp; |
869 | const char *sym = NULL; | 869 | const char *sym = NULL; |
870 | unsigned int i = *(loff_t *) v; | 870 | unsigned int i = *(loff_t *) v; |
871 | unsigned long size, offset = 0; | 871 | unsigned long offset = 0; |
872 | char *modname, namebuf[128]; | 872 | char *modname, namebuf[128]; |
873 | 873 | ||
874 | head = &kprobe_table[i]; | 874 | head = &kprobe_table[i]; |
875 | preempt_disable(); | 875 | preempt_disable(); |
876 | hlist_for_each_entry_rcu(p, node, head, hlist) { | 876 | hlist_for_each_entry_rcu(p, node, head, hlist) { |
877 | sym = kallsyms_lookup((unsigned long)p->addr, &size, | 877 | sym = kallsyms_lookup((unsigned long)p->addr, NULL, |
878 | &offset, &modname, namebuf); | 878 | &offset, &modname, namebuf); |
879 | if (p->pre_handler == aggr_pre_handler) { | 879 | if (p->pre_handler == aggr_pre_handler) { |
880 | list_for_each_entry_rcu(kp, &p->list, list) | 880 | list_for_each_entry_rcu(kp, &p->list, list) |