]> Pileus Git - ~andy/linux/blobdiff - kernel/kprobes.c
[PARISC] Add some defines for HugeTLB pages
[~andy/linux] / kernel / kprobes.c
index f1c0e61a2cb492532633141274348d7da38a8012..34a885bb82e0d94a38a7ebec8e8014cf2dc197d1 100644 (file)
@@ -48,7 +48,7 @@
 static struct hlist_head kprobe_table[KPROBE_TABLE_SIZE];
 static struct hlist_head kretprobe_inst_table[KPROBE_TABLE_SIZE];
 
-static DECLARE_MUTEX(kprobe_mutex);    /* Protects kprobe_table */
+DECLARE_MUTEX(kprobe_mutex);           /* Protects kprobe_table */
 DEFINE_SPINLOCK(kretprobe_lock);       /* Protects kretprobe_inst_table */
 static DEFINE_PER_CPU(struct kprobe *, kprobe_instance) = NULL;
 
@@ -431,7 +431,7 @@ static int __kprobes register_aggr_kprobe(struct kprobe *old_p,
                copy_kprobe(old_p, p);
                ret = add_new_kprobe(old_p, p);
        } else {
-               ap = kcalloc(1, sizeof(struct kprobe), GFP_KERNEL);
+               ap = kzalloc(sizeof(struct kprobe), GFP_KERNEL);
                if (!ap)
                        return -ENOMEM;
                add_aggr_kprobe(ap, old_p);
@@ -532,9 +532,7 @@ valid_p:
                        list_del_rcu(&p->list);
                        kfree(old_p);
                }
-               down(&kprobe_mutex);
                arch_remove_kprobe(p);
-               up(&kprobe_mutex);
        }
 }