[REFACTOR] rename and move arch_remove_kprobe()
authorVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Apr 2013 07:39:02 +0000 (11:39 +0400)
committerVyacheslav Cherkashin <v.cherkashin@samsung.com>
Wed, 3 Apr 2013 07:39:02 +0000 (11:39 +0400)
rename:
arch_remove_kprobe() --> remove_kprobe()
move:
from src/modules/kprobe/arch/dbi_kprobes.c
to src/modules/kprobe/dbi_kprobes.c

kprobe/arch/dbi_kprobes.c
kprobe/arch/dbi_kprobes.h
kprobe/dbi_kprobes.c

index 1b768ab..9c29a09 100644 (file)
 
 extern struct hlist_head kprobe_insn_pages;
 
-void arch_remove_kprobe(struct kprobe *p)
-{
-       // TODO: check boostable for x86 and MIPS
-       free_insn_slot(&kprobe_insn_pages, NULL, p->ainsn.insn);
-}
-
 int arch_init_module_dependencies(void)
 {
        int ret;
index 0141cb9..251ff75 100644 (file)
@@ -75,8 +75,6 @@ extern int arch_init_kprobes (void);
 extern void dbi_arch_exit_kprobes (void);
 extern int patch_suspended_task(struct kretprobe *rp, struct task_struct *tsk);
 
-void arch_remove_kprobe(struct kprobe *p);
-
 void prepare_singlestep (struct kprobe *p, struct pt_regs *regs);
 void save_previous_kprobe (struct kprobe_ctlblk *kcb, struct kprobe *cur_p);
 void restore_previous_kprobe (struct kprobe_ctlblk *kcb);
index bce27e5..53068cd 100644 (file)
@@ -447,6 +447,12 @@ int register_aggr_kprobe(struct kprobe *old_p, struct kprobe *p)
 }
 EXPORT_SYMBOL_GPL(register_aggr_kprobe);
 
+static void remove_kprobe(struct kprobe *p)
+{
+       /* TODO: check boostable for x86 and MIPS */
+       free_insn_slot(&kprobe_insn_pages, NULL, p->ainsn.insn);
+}
+
 int dbi_register_kprobe(struct kprobe *p)
 {
        struct kprobe *old_p;
@@ -539,7 +545,7 @@ valid_p:
                        synchronize_sched();
                }
 
-               arch_remove_kprobe(p);
+               remove_kprobe(p);
        } else {
                if (p->break_handler)
                        old_p->break_handler = NULL;