From efce983cbcc5cc3ed9ccf00d931c66873a2d7e6b Mon Sep 17 00:00:00 2001 From: Vyacheslav Cherkashin Date: Wed, 15 Jul 2015 15:29:09 +0300 Subject: [FIX] remove uprobe from hash table on error Change-Id: I8f860004eb9b8c23c11a5e47899cfdb916529a64 Signed-off-by: Vyacheslav Cherkashin --- uprobe/swap_uprobes.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'uprobe') diff --git a/uprobe/swap_uprobes.c b/uprobe/swap_uprobes.c index f9ad605c..da8274c5 100644 --- a/uprobe/swap_uprobes.c +++ b/uprobe/swap_uprobes.c @@ -528,8 +528,11 @@ int swap_register_uprobe(struct uprobe *up) &uprobe_table[hash_ptr(p->addr, UPROBE_HASH_BITS)]); ret = arm_uprobe(up); - if (ret) + if (ret) { + hlist_del_rcu(&p->hlist); + synchronize_rcu(); remove_uprobe(up); + } out: DBPRINTF("out ret = 0x%x\n", ret); -- cgit v1.2.3