Possible bug?
Usyskin, Alexander
alexander.usyskin at intel.com
Tue Nov 11 02:58:03 PST 2025
> >> >
> >> >It's probably due to struct intel_dg_nvm regions[] member being
> >> >__counted_by(nregions) but regions[] is indexed before nregions has
> been
> >> >initialized.
> >>
> >> yeah... and we shouldn't silently continue hiding the ENOMEM... Sasha,
> >> something like this?
> >>
> >
> > In general, looks good for me, but I see that we can fill less entries because
> of
> > if (!invm->regions[i].name)
> > continue;
> >
> > Let's leave 'nvm->nregions = n;' in place, only need to fix the comment.
>
> You have this in place, nregions already accouns for them:
>
> /* count available regions */
> for (nregions = 0, i = 0; i < INTEL_DG_NVM_REGIONS; i++) {
> if (invm->regions[i].name)
> nregions++;
> }
>
Yeah, missed this, so original fix from Lucas is ok
- -
Thanks,
Sasha
> BR,
> Jani.
>
>
More information about the linux-mtd
mailing list