[PATCH v4 2/2] tracing/ring-buffer: Fix wait_on_pipe() race