Skip to content

Commit

Permalink
Merge tag 'trace-v4.11-rc5' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/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()
  • Loading branch information
Linus Torvalds committed Apr 6, 2017
2 parents ea6b172 + 62277de commit 4691f4a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions kernel/trace/ring_buffer.c
Original file line number Diff line number Diff line change
Expand Up @@ -4826,9 +4826,9 @@ static __init int test_ringbuffer(void)
rb_data[cpu].cnt = cpu;
rb_threads[cpu] = kthread_create(rb_test, &rb_data[cpu],
"rbtester/%d", cpu);
if (WARN_ON(!rb_threads[cpu])) {
if (WARN_ON(IS_ERR(rb_threads[cpu]))) {
pr_cont("FAILED\n");
ret = -1;
ret = PTR_ERR(rb_threads[cpu]);
goto out_free;
}

Expand All @@ -4838,9 +4838,9 @@ static __init int test_ringbuffer(void)

/* Now create the rb hammer! */
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");
ret = -1;
ret = PTR_ERR(rb_hammer);
goto out_free;
}

Expand Down

0 comments on commit 4691f4a

Please sign in to comment.