[openEuler-5.10 126/557] ring-buffer: Protect ring_buffer_reset() from reentrancy