]> git.baikalelectronics.ru Git - kernel.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)
committerSteven Rostedt (Google) <rostedt@goodmis.org>
Thu, 17 Nov 2022 22:10:40 +0000 (17:10 -0500)
commit9e1ced47bcf06a9cbf5a0090ac6597b8cf34a009
treeb72c17d1e457578b5650cef39bf861e261608202
parent4db6ede358dbfe80b8d8fc3bcda566d4f05f48f3
ring_buffer: Do not deactivate non-existant pages

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: 9cbe68a889233 ("ring-buffer: make lockless")
Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru>
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c