Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[linux-2.6-microblaze.git] / kernel / trace / trace_event_perf.c
index d5e01c3..c894614 100644 (file)
@@ -42,6 +42,13 @@ static int perf_trace_event_perm(struct ftrace_event_call *tp_event,
                 */
                if (!p_event->attr.exclude_callchain_user)
                        return -EINVAL;
+
+               /*
+                * Same reason to disable user stack dump as for user space
+                * callchains above.
+                */
+               if (p_event->attr.sample_type & PERF_SAMPLE_STACK_USER)
+                       return -EINVAL;
        }
 
        /* No tracing, just counting, so no obvious leak */