summaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 14:04:41 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2014-12-13 14:04:41 -0800
commit8f4385d590d4296ec38e228d17b1d002f6031dd2 (patch)
tree1be286e0a0a2ab63da0bd4f7d5d8b61ebc5bf3db /kernel
parent52bb452558a426ba265a19e6eadc66cf95613014 (diff)
parent1fb8915b9876a80f43732980208b39d013f8da9d (diff)
downloadblackbird-obmc-linux-8f4385d590d4296ec38e228d17b1d002f6031dd2.tar.gz
blackbird-obmc-linux-8f4385d590d4296ec38e228d17b1d002f6031dd2.zip
Merge tag 'trace-seq-buf-3.19-v2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace
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
Diffstat (limited to 'kernel')
-rw-r--r--kernel/printk/printk.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/kernel/printk/printk.c b/kernel/printk/printk.c
index f900dc9f6822..02d6b6d28796 100644
--- a/kernel/printk/printk.c
+++ b/kernel/printk/printk.c
@@ -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;
OpenPOWER on IntegriCloud