[PATCH 36/66] ring-buffer: Fix recursion protection transitions between interrupt context