[PATCH 6.2 516/663] tracing/user_events: Ensure write index cannot be negative