[PATCH 6.3 573/694] tracing/user_events: Ensure write index cannot be negative