From 4ce729d04ee41d4f6d64f01bae133e0384ae7571 Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Mon, 1 Apr 2013 14:11:21 +0400 Subject: [PATCH] [REFACTOR] remove field 'disarm' from 'srtuct uretprobe' --- uprobe/swap_uprobes.c | 6 ------ uprobe/swap_uprobes.h | 1 - 2 files changed, 7 deletions(-) diff --git a/uprobe/swap_uprobes.c b/uprobe/swap_uprobes.c index 4309a02..a3f5be7 100644 --- a/uprobe/swap_uprobes.c +++ b/uprobe/swap_uprobes.c @@ -746,9 +746,6 @@ static int pre_handler_uretprobe(struct kprobe *p, struct pt_regs *regs) /* TODO: consider to only swap the RA after the last pre_handler fired */ spin_lock_irqsave(&uretprobe_lock, flags); - if (rp->disarm) { - goto unlock; - } /* TODO: test - remove retprobe after func entry but before its exit */ if ((ri = get_free_urp_inst(rp)) != NULL) { @@ -762,7 +759,6 @@ static int pre_handler_uretprobe(struct kprobe *p, struct pt_regs *regs) ++rp->nmissed; } -unlock: spin_unlock_irqrestore(&uretprobe_lock, flags); return 0; @@ -780,8 +776,6 @@ int dbi_register_uretprobe(struct uretprobe *rp, int atomic) rp->up.kp.fault_handler = NULL; rp->up.kp.break_handler = NULL; - rp->disarm = 0; - /* Pre-allocate memory for max kretprobe instances */ if (rp->maxactive <= 0) { #if 1//def CONFIG_PREEMPT diff --git a/uprobe/swap_uprobes.h b/uprobe/swap_uprobes.h index ea63b78..902d990 100644 --- a/uprobe/swap_uprobes.h +++ b/uprobe/swap_uprobes.h @@ -65,7 +65,6 @@ struct uretprobe { void *priv_arg; int maxactive; int nmissed; - int disarm; struct hlist_head free_instances; struct hlist_head used_instances; }; -- 2.7.4