Re: [PATCH] ring-buffer: Have the buffer update counter be atomic
From: Steven Rostedt
Date: Fri Oct 11 2024 - 12:44:05 EST
On Fri, 11 Oct 2024 17:20:12 +0200
Petr Pavlu <petr.pavlu@xxxxxxxx> wrote:
> I agree, I also noticed the missing locking in this function and it
> looked to me as something that should be fixed. I happen to have
> a somewhat more complex patch for it from a few months ago (pasted
> below). I think I didn't send it to the list because I then noticed
> other potential locking problems with the subbuf code, which I wanted to
> examine more closely first.
>
Hmm, I think you are correct that the buffer->mutex isn't enough for the
sub buffer page and it requires a bigger window. I'll look at your patch
and also the logic to see if it can be squeezed down a little.
-- Steve