module: use RCU to synchronize find_module
[linux-2.6-microblaze.git] / kernel / trace / trace_kprobe.c
index 9c31f42..3137992 100644 (file)
@@ -124,9 +124,9 @@ static nokprobe_inline bool trace_kprobe_module_exist(struct trace_kprobe *tk)
        if (!p)
                return true;
        *p = '\0';
-       mutex_lock(&module_mutex);
+       rcu_read_lock_sched();
        ret = !!find_module(tk->symbol);
-       mutex_unlock(&module_mutex);
+       rcu_read_unlock_sched();
        *p = ':';
 
        return ret;
@@ -434,7 +434,7 @@ static int disable_trace_kprobe(struct trace_event_call *call,
        return 0;
 }
 
-#if defined(CONFIG_KPROBES_ON_FTRACE) && \
+#if defined(CONFIG_DYNAMIC_FTRACE) && \
        !defined(CONFIG_KPROBE_EVENTS_ON_NOTRACE)
 static bool __within_notrace_func(unsigned long addr)
 {