]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Do not die if rb_iter_peek() fails more than thrice
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Tue, 17 Mar 2020 21:32:28 +0000 (17:32 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 19 Mar 2020 23:11:19 +0000 (19:11 -0400)
commit23157e6ab5bf14aa691cdca3647fe59cef0f37ca
tree63fff4f557b19618a9d4bcc8e224f111c2300226
parentb890523622498c3c71aca8c4948aaf764b608a29
ring-buffer: Do not die if rb_iter_peek() fails more than thrice

As the iterator will be reading a live buffer, and if the event being read
is on a page that a writer crosses, it will fail and try again, the
condition in rb_iter_peek() that only allows a retry to happen three times
is no longer valid. Allow rb_iter_peek() to retry more than three times
without killing the ring buffer, but only if rb_iter_head_event() had failed
at least once.

Link: http://lkml.kernel.org/r/20200317213416.452888193@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
kernel/trace/ring_buffer.c