]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
ring_buffer: Do not deactivate non-existant pages
authorDaniil Tatianin <d-tatianin@yandex-team.ru>
Mon, 14 Nov 2022 14:31:29 +0000 (17:31 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Nov 2022 16:35:40 +0000 (17:35 +0100)
commitf2302d65e64f26ae22632c4a217a07f7cf3afe93
tree01d7eabb772f2e7913173815fbf2362110e136ac
parentf58d6876308466cc99c55b1eb9dd34c3c8889ac0
ring_buffer: Do not deactivate non-existant pages

commit 56f4ca0a79a9f1af98f26c54b9b89ba1f9bcc6bd upstream.

rb_head_page_deactivate() expects cpu_buffer to contain a valid list of
->pages, so verify that the list is actually present before calling it.

Found by Linux Verification Center (linuxtesting.org) with the SVACE
static analysis tool.

Link: https://lkml.kernel.org/r/20221114143129.3534443-1-d-tatianin@yandex-team.ru
Cc: stable@vger.kernel.org
Fixes: 77ae365eca895 ("ring-buffer: make lockless")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ring_buffer.c