[PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
Boris Brezillon
boris.brezillon at collabora.com
Mon Apr 3 06:28:18 UTC 2023
+David
On Fri, 21 May 2021 11:42:04 +0100
Steven Price <steven.price at arm.com> wrote:
> On 21/05/2021 10:38, Boris Brezillon wrote:
> > Make sure all bo->base.pages entries are either NULL or pointing to a
> > valid page before calling drm_gem_shmem_put_pages().
> >
> > Reported-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
> > Cc: <stable at vger.kernel.org>
> > Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
> > Signed-off-by: Boris Brezillon <boris.brezillon at collabora.com>
>
> Reviewed-by: Steven Price <steven.price at arm.com>
Queued to drm-misc-fixes.
>
> > ---
> > drivers/gpu/drm/panfrost/panfrost_mmu.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/gpu/drm/panfrost/panfrost_mmu.c b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > index 569509c2ba27..d76dff201ea6 100644
> > --- a/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > +++ b/drivers/gpu/drm/panfrost/panfrost_mmu.c
> > @@ -460,6 +460,7 @@ static int panfrost_mmu_map_fault_addr(struct panfrost_device *pfdev, int as,
> > if (IS_ERR(pages[i])) {
> > mutex_unlock(&bo->base.pages_lock);
> > ret = PTR_ERR(pages[i]);
> > + pages[i] = NULL;
> > goto err_pages;
> > }
> > }
> >
>
More information about the dri-devel
mailing list