[PATCH 6.5 593/739] tracing: Fix race issue between cpu buffer write and swap