[PATCH 6.1 470/611] tracing/user_events: Ensure write index cannot be negative