diff options
author | Ingo Molnar <mingo@elte.hu> | 2010-10-16 20:17:25 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2010-10-16 20:17:25 +0200 |
commit | f92f6e6ee35d2779aa62e70f78ad8e1cd417eb52 (patch) | |
tree | 1e8e2ee34678a43d416c4bab58f9ca91673d4444 /drivers/oprofile/oprofile_files.c | |
parent | 66af86e2c630908b21cec018cb612576cf5f516e (diff) | |
parent | cd254f295248c98b62ea824f361e10d80a081fe7 (diff) |
Merge branch 'core' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/core
Diffstat (limited to 'drivers/oprofile/oprofile_files.c')
-rw-r--r-- | drivers/oprofile/oprofile_files.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/oprofile/oprofile_files.c b/drivers/oprofile/oprofile_files.c index bbd7516e086..ccf099e684a 100644 --- a/drivers/oprofile/oprofile_files.c +++ b/drivers/oprofile/oprofile_files.c @@ -79,14 +79,17 @@ static ssize_t depth_write(struct file *file, char const __user *buf, size_t cou if (*offset) return -EINVAL; + if (!oprofile_ops.backtrace) + return -EINVAL; + retval = oprofilefs_ulong_from_user(&val, buf, count); if (retval) return retval; - retval = oprofile_set_backtrace(val); - + retval = oprofile_set_ulong(&oprofile_backtrace_depth, val); if (retval) return retval; + return count; } |