]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'trace-seq-buf-3.19-v2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 22:04:41 +0000 (14:04 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Sat, 13 Dec 2014 22:04:41 +0000 (14:04 -0800)
Pull tracing fixlet from Steven Rostedt:
 "Remove unnecessary preempt_disable in printk()"

* tag 'trace-seq-buf-3.19-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  printk: Do not disable preemption for accessing printk_func

kernel/printk/printk.c

index f900dc9f682240827840d8d9d7df65830474cc44..02d6b6d28796992f437b75c43fff57a119fae752 100644 (file)
@@ -1857,10 +1857,16 @@ asmlinkage __visible int printk(const char *fmt, ...)
        int r;
 
        va_start(args, fmt);
-       preempt_disable();
+
+       /*
+        * If a caller overrides the per_cpu printk_func, then it needs
+        * to disable preemption when calling printk(). Otherwise
+        * the printk_func should be set to the default. No need to
+        * disable preemption here.
+        */
        vprintk_func = this_cpu_read(printk_func);
        r = vprintk_func(fmt, args);
-       preempt_enable();
+
        va_end(args);
 
        return r;