Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8f4385d5 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge tag 'trace-seq-buf-3.19-v2' of...

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
parents 52bb4525 1fb8915b
Loading
Loading
Loading
Loading
+8 −2
Original line number Original line Diff line number Diff line
@@ -1857,10 +1857,16 @@ asmlinkage __visible int printk(const char *fmt, ...)
	int r;
	int r;


	va_start(args, fmt);
	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);
	vprintk_func = this_cpu_read(printk_func);
	r = vprintk_func(fmt, args);
	r = vprintk_func(fmt, args);
	preempt_enable();

	va_end(args);
	va_end(args);


	return r;
	return r;