summaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2010-10-22 15:13:45 +0200
committerIngo Molnar <mingo@elte.hu>2010-10-22 15:13:45 +0200
commiteea4a0b19a2719e3e23b5450dd9fbe97789d2a57 (patch)
treec0fccc0d532bb4c4fc0a6e13ea13a08d47192b9e /kernel/trace
parentd7842da470f244d258f21c5f72cd8388b3541d04 (diff)
parentdd49a38cf30944be27892c10b1c0e5b3fa73bcb2 (diff)
downloadlinux-eea4a0b19a2719e3e23b5450dd9fbe97789d2a57.tar.gz
linux-eea4a0b19a2719e3e23b5450dd9fbe97789d2a57.tar.bz2
linux-eea4a0b19a2719e3e23b5450dd9fbe97789d2a57.zip
Merge branch 'tip/perf/core-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/trace.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c
index 001bcd2ccf4a..82d9b8106cd0 100644
--- a/kernel/trace/trace.c
+++ b/kernel/trace/trace.c
@@ -3996,13 +3996,9 @@ static void tracing_init_debugfs_percpu(long cpu)
{
struct dentry *d_percpu = tracing_dentry_percpu();
struct dentry *d_cpu;
- /* strlen(cpu) + MAX(log10(cpu)) + '\0' */
- char cpu_dir[7];
+ char cpu_dir[30]; /* 30 characters should be more than enough */
- if (cpu > 999 || cpu < 0)
- return;
-
- sprintf(cpu_dir, "cpu%ld", cpu);
+ snprintf(cpu_dir, 30, "cpu%ld", cpu);
d_cpu = debugfs_create_dir(cpu_dir, d_percpu);
if (!d_cpu) {
pr_warning("Could not create debugfs '%s' entry\n", cpu_dir);