Commit 4691f4a6 authored by Linus Torvalds's avatar Linus Torvalds

Merge tag 'trace-v4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fix from Steven Rostedt:
 "Wei Yongjun fixed a long standing bug in the ring buffer startup test.

  If for some unknown reason, the kthread that is created fails to be
  created, the return from kthread_create() is an PTR_ERR and not a
  NULL. The test incorrectly checks for NULL instead of an error"

* tag 'trace-v4.11-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
  ring-buffer: Fix return value check in test_ringbuffer()
parents ea6b1720 62277de7
...@@ -4826,9 +4826,9 @@ static __init int test_ringbuffer(void) ...@@ -4826,9 +4826,9 @@ static __init int test_ringbuffer(void)
rb_data[cpu].cnt = cpu; rb_data[cpu].cnt = cpu;
rb_threads[cpu] = kthread_create(rb_test, &rb_data[cpu], rb_threads[cpu] = kthread_create(rb_test, &rb_data[cpu],
"rbtester/%d", cpu); "rbtester/%d", cpu);
if (WARN_ON(!rb_threads[cpu])) { if (WARN_ON(IS_ERR(rb_threads[cpu]))) {
pr_cont("FAILED\n"); pr_cont("FAILED\n");
ret = -1; ret = PTR_ERR(rb_threads[cpu]);
goto out_free; goto out_free;
} }
...@@ -4838,9 +4838,9 @@ static __init int test_ringbuffer(void) ...@@ -4838,9 +4838,9 @@ static __init int test_ringbuffer(void)
/* Now create the rb hammer! */ /* Now create the rb hammer! */
rb_hammer = kthread_run(rb_hammer_test, NULL, "rbhammer"); rb_hammer = kthread_run(rb_hammer_test, NULL, "rbhammer");
if (WARN_ON(!rb_hammer)) { if (WARN_ON(IS_ERR(rb_hammer))) {
pr_cont("FAILED\n"); pr_cont("FAILED\n");
ret = -1; ret = PTR_ERR(rb_hammer);
goto out_free; goto out_free;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment