[PATCH 30/87] ring-buffer: Fix recursion protection transitions between interrupt context