Re: [PATCH] dma-fence: Make dma_fence_dedup_array() robust against 0-count input

From: Philipp Stanner

Date: Mon Jun 29 2026 - 06:19:48 EST


On Mon, 2026-06-29 at 11:52 +0200, Christian König wrote:
> On 6/29/26 11:06, Philipp Stanner wrote:
> > On Mon, 2026-06-29 at 10:52 +0200, Christian König wrote:
> > > On 6/29/26 10:49, Philipp Stanner wrote:
> > > > >
> > > > > I will add a CC stable before pushing to drm-misc-fixes.
> > > >
> > > > No offense intended or taken, but don't the DRM rules say that
> > > > things
> > > > do not get merged while there are outstanding concerns or
> > > > significant
> > > > points in review feedback?
> > >
> > > I haven't seen that before writing the response.
> > >
> > > I usually go over my mails till the end and wait a couple of
> > > hours before pushing anything.
> > >
> > > > What about my comments?
> > >
> > > Looks valid to me as well, but I think that is a separate issue.
> >
> > But if we keep it an integer for now, and if that check is added,
> > and
> > it most certainly should also catch negative integers, shouldn't
> > it?
>
> Maybe with a WARN_ON(), but not as regular code path.
>
> The thing is I think we need to backport this fix to stable kernels,
> but switching from signed to unsigned is only a minor cleanup when no
> real users are currently affected.

Fine by me.

P.