]> git.baikalelectronics.ru Git - kernel.git/commit
ring-buffer: Remove all BUG() calls
authorSteven Rostedt (VMware) <rostedt@goodmis.org>
Wed, 13 May 2020 19:36:22 +0000 (15:36 -0400)
committerSteven Rostedt (VMware) <rostedt@goodmis.org>
Thu, 14 May 2020 12:51:02 +0000 (08:51 -0400)
commit7e345298154df78984212d4e27366a85d690a6a9
treedc431f5ef23fd51a8a54768b5a865994d9390c85
parent821dd8e68f3ba3376fc3f1f5d915e11d56e49969
ring-buffer: Remove all BUG() calls

There's a lot of checks to make sure the ring buffer is working, and if an
anomaly is detected, it safely shuts itself down. But there's a few cases
that it will call BUG(), which defeats the point of being safe (it crashes
the kernel when an anomaly is found!). There's no reason for them. Switch
them all to either WARN_ON_ONCE() (when no ring buffer descriptor is present),
or to RB_WARN_ON() (when a ring buffer descriptor is present).

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