diff options
| author | Christoph Hellwig <hch@lst.de> | 2007-05-08 03:34:14 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-05-08 14:15:19 -0400 |
| commit | 4c4308cb93450989846ac49faeb6dab943e7657e (patch) | |
| tree | c06092cae6f95a243cdd758d07491cf5fa24a1dd /include/linux | |
| parent | 6f716acd5fa20ae6a35ab29ae37fa9189e839ed5 (diff) | |
kprobes: kretprobes simplifications
- consolidate duplicate code in all arch_prepare_kretprobe instances
into common code
- replace various odd helpers that use hlist_for_each_entry to get
the first elemenet of a list with either a hlist_for_each_entry_save
or an opencoded access to the first element in the caller
- inline add_rp_inst into it's only remaining caller
- use kretprobe_inst_table_head instead of opencoding it
Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Prasanna S Panchamukhi <prasanna@in.ibm.com>
Acked-by: Ananth N Mavinakayanahalli <ananth@in.ibm.com>
Cc: Anil S Keshavamurthy <anil.s.keshavamurthy@intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/kprobes.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/include/linux/kprobes.h b/include/linux/kprobes.h index 850ee871e353..6fc623e41fd8 100644 --- a/include/linux/kprobes.h +++ b/include/linux/kprobes.h | |||
| @@ -123,7 +123,8 @@ DECLARE_PER_CPU(struct kprobe *, current_kprobe); | |||
| 123 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); | 123 | DECLARE_PER_CPU(struct kprobe_ctlblk, kprobe_ctlblk); |
| 124 | 124 | ||
| 125 | #ifdef ARCH_SUPPORTS_KRETPROBES | 125 | #ifdef ARCH_SUPPORTS_KRETPROBES |
| 126 | extern void arch_prepare_kretprobe(struct kretprobe *rp, struct pt_regs *regs); | 126 | extern void arch_prepare_kretprobe(struct kretprobe_instance *ri, |
| 127 | struct pt_regs *regs); | ||
| 127 | #else /* ARCH_SUPPORTS_KRETPROBES */ | 128 | #else /* ARCH_SUPPORTS_KRETPROBES */ |
| 128 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, | 129 | static inline void arch_prepare_kretprobe(struct kretprobe *rp, |
| 129 | struct pt_regs *regs) | 130 | struct pt_regs *regs) |
| @@ -209,8 +210,6 @@ void jprobe_return(void); | |||
| 209 | int register_kretprobe(struct kretprobe *rp); | 210 | int register_kretprobe(struct kretprobe *rp); |
| 210 | void unregister_kretprobe(struct kretprobe *rp); | 211 | void unregister_kretprobe(struct kretprobe *rp); |
| 211 | 212 | ||
| 212 | struct kretprobe_instance *get_free_rp_inst(struct kretprobe *rp); | ||
| 213 | void add_rp_inst(struct kretprobe_instance *ri); | ||
| 214 | void kprobe_flush_task(struct task_struct *tk); | 213 | void kprobe_flush_task(struct task_struct *tk); |
| 215 | void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); | 214 | void recycle_rp_inst(struct kretprobe_instance *ri, struct hlist_head *head); |
| 216 | #else /* CONFIG_KPROBES */ | 215 | #else /* CONFIG_KPROBES */ |
