oprofile: disable write access to oprofilefs while profiler is running
[deliverable/linux.git] / drivers / oprofile / oprof.c
index b4a685719dbac62474fe66dff8443a02ac326343..f9bda64fcd1b62771880d5d823b53f797cb9c7f0 100644 (file)
@@ -225,26 +225,17 @@ post_sync:
        mutex_unlock(&start_mutex);
 }
 
-int oprofile_set_backtrace(unsigned long val)
+int oprofile_set_ulong(unsigned long *addr, unsigned long val)
 {
-       int err = 0;
+       int err = -EBUSY;
 
        mutex_lock(&start_mutex);
-
-       if (oprofile_started) {
-               err = -EBUSY;
-               goto out;
+       if (!oprofile_started) {
+               *addr = val;
+               err = 0;
        }
-
-       if (!oprofile_ops.backtrace) {
-               err = -EINVAL;
-               goto out;
-       }
-
-       oprofile_backtrace_depth = val;
-
-out:
        mutex_unlock(&start_mutex);
+
        return err;
 }
 
This page took 0.035189 seconds and 5 git commands to generate.