tracing: Have preempt(irqs)off trace preempt disabled functions
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / kernel / trace / trace_event_perf.c
index 84b1e045faba836583fb371d285f49e79bfa6bd0..8354dc81ae6407c970a10a2bb40523085bc56e0a 100644 (file)
@@ -26,7 +26,7 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
 {
        /* The ftrace function trace is allowed only for root. */
        if (ftrace_event_is_function(tp_event) &&
-           perf_paranoid_kernel() && !capable(CAP_SYS_ADMIN))
+           perf_paranoid_tracepoint_raw() && !capable(CAP_SYS_ADMIN))
                return -EPERM;
 
        /* No tracing, just counting, so no obvious leak */