ring-buffer: Have the shortest_full queue be the shortest not longest
authorSteven Rostedt (Google) <rostedt@goodmis.org>
Tue, 27 Sep 2022 23:15:24 +0000 (19:15 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 26 Oct 2022 10:34:30 +0000 (12:34 +0200)
commitbc6d4e9d64845110948546d750f14538aa84d01a
tree720a077e7f11b51f459731f88fd97bef91102b16
parente8d116738514f5d3cd2a09f812e576be281e7a5f
ring-buffer: Have the shortest_full queue be the shortest not longest

commit 3b19d614b61b93a131f463817e08219c9ce1fee3 upstream.

The logic to know when the shortest waiters on the ring buffer should be
woken up or not has uses a less than instead of a greater than compare,
which causes the shortest_full to actually be the longest.

Link: https://lkml.kernel.org/r/20220927231823.718039222@goodmis.org
Cc: stable@vger.kernel.org
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Fixes: 2c2b0a78b3739 ("ring-buffer: Add percentage of ring buffer full to wake up reader")
Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
kernel/trace/ring_buffer.c