Re: [PATCH] ring-buffer: Fix a oob in __rb_map_vma

From: Vincent Donnefort
Date: Wed Dec 18 2024 - 09:31:57 EST


On Wed, Dec 18, 2024 at 08:19:58AM -0500, Steven Rostedt wrote:
> On Wed, 18 Dec 2024 09:13:43 +0000
> Vincent Donnefort <vdonnefort@xxxxxxxxxx> wrote:
>
> > And probably also
> >
> > Fixes: 117c39200d9d ("ring-buffer: Introducing ring-buffer mapping functions")
>
> I don't require patch submitters to add Fixes tags. It's more the
> responsibility of the maintainer to do that. I still have to validate it as
> there's been several times someone adds a Fixes tag which wasn't the right
> commit that it fixed.
>
> -- Steve

Ack.

Aside, there's a selftest to check for the overflow of subbufs with the
mapping... but of course it didn't test with offset > nr_subbufs.

Do you think it is worth to extend it to cover this case? I'm happy to do a
quick patch.

--
Vincent