Patch "ring-buffer: Fix return value check in test_ringbuffer()" has been added to the 4.4-stable tree
Subsystems (3)
This is a note to let you know that I've just added the patch titled
ring-buffer: Fix return value check in test_ringbuffer()
to the 4.4-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
ring-buffer-fix-return-value-check-in-test_ringbuffer.patch
and it can be found in the queue-4.4 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
62277de758b155dc04b78f195a1cb5208c37b2dfMon Sep 17 00:00:00 2001
From: Wei Yongjun <[email protected]>
Date: Fri, 17 Jun 2016 17:33:59 +0000
Subject: ring-buffer: Fix return value check in test_ringbuffer()
From: Wei Yongjun <[email protected]>
commit 62277de758b155dc04b78f195a1cb5208c37b2df upstream.
In case of error, the function kthread_run() returns ERR_PTR() and never returns NULL. The NULL test in the return value check should be replaced with IS_ERR().
--- kernel/trace/ring_buffer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
kernel/trace/ring_buffer.c +4 -4
@@ -4875,9 +4875,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; }
@@ -4887,9 +4887,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; }
Patches currently in stable-queue which might be from [email protected] are
queue-4.4/ring-buffer-fix-return-value-check-in-test_ringbuffer.patch