[PATCH 6.4 244/292] ring-buffer: Fix deadloop issue on reading trace_pipe