Commit 4a2bb6fc authored by Masami Hiramatsu's avatar Masami Hiramatsu Committed by Ingo Molnar
Browse files

kprobes: No need to unlock kprobe_insn_mutex

Remove needless kprobe_insn_mutex unlocking during safety check
in garbage collection, because if someone releases a dirty slot
during safety check (which ensures other cpus doesn't execute
all dirty slots), the safety check must be fail. So, we need to
hold the mutex while checking safety.
Signed-off-by: default avatarMasami Hiramatsu <>
Cc: Ananth N Mavinakayanahalli <>
Cc: Jim Keniston <>
Cc: Ananth N Mavinakayanahalli <>
LKML-Reference: <20090630210809.17851.28781.stgit@localhost.localdomain>
Signed-off-by: default avatarIngo Molnar <>
parent 238a24f6
......@@ -237,13 +237,9 @@ static int __kprobes collect_garbage_slots(void)
struct kprobe_insn_page *kip;
struct hlist_node *pos, *next;
int safety;
/* Ensure no-one is preepmted on the garbages */
safety = check_safety();
if (safety != 0)
if (check_safety())
return -EAGAIN;
hlist_for_each_entry_safe(kip, pos, next, &kprobe_insn_pages, hlist) {
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment