* [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
@ 2021-05-21 9:38 ` Boris Brezillon
0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2021-05-21 9:38 UTC (permalink / raw)
To: Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig, Steven Price, Robin Murphy
Cc: dri-devel, Boris Brezillon, stable
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@collabora.com>
Cc: <stable@vger.kernel.org>
Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
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;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
@ 2021-05-21 9:38 ` Boris Brezillon
0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2021-05-21 9:38 UTC (permalink / raw)
To: Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig, Steven Price, Robin Murphy
Cc: Boris Brezillon, stable, dri-devel
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@collabora.com>
Cc: <stable@vger.kernel.org>
Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
---
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;
}
}
--
2.31.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
2021-05-21 9:38 ` Boris Brezillon
@ 2021-05-21 10:42 ` Steven Price
-1 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2021-05-21 10:42 UTC (permalink / raw)
To: Boris Brezillon, Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig,
Robin Murphy
Cc: dri-devel, stable
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@collabora.com>
> Cc: <stable@vger.kernel.org>
> Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> 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;
> }
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
@ 2021-05-21 10:42 ` Steven Price
0 siblings, 0 replies; 6+ messages in thread
From: Steven Price @ 2021-05-21 10:42 UTC (permalink / raw)
To: Boris Brezillon, Rob Herring, Tomeu Vizoso, Alyssa Rosenzweig,
Robin Murphy
Cc: stable, dri-devel
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@collabora.com>
> Cc: <stable@vger.kernel.org>
> Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
> Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Steven Price <steven.price@arm.com>
> ---
> 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;
> }
> }
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
2021-05-21 10:42 ` Steven Price
@ 2023-04-03 6:28 ` Boris Brezillon
-1 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2023-04-03 6:28 UTC (permalink / raw)
To: Steven Price
Cc: Rob Herring, Alyssa Rosenzweig, Robin Murphy, dri-devel, stable,
david.heidelberg
+David
On Fri, 21 May 2021 11:42:04 +0100
Steven Price <steven.price@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@collabora.com>
> > Cc: <stable@vger.kernel.org>
> > Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
>
> Reviewed-by: Steven Price <steven.price@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;
> > }
> > }
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path
@ 2023-04-03 6:28 ` Boris Brezillon
0 siblings, 0 replies; 6+ messages in thread
From: Boris Brezillon @ 2023-04-03 6:28 UTC (permalink / raw)
To: Steven Price
Cc: dri-devel, stable, david.heidelberg, Rob Herring,
Alyssa Rosenzweig, Robin Murphy
+David
On Fri, 21 May 2021 11:42:04 +0100
Steven Price <steven.price@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@collabora.com>
> > Cc: <stable@vger.kernel.org>
> > Fixes: 187d2929206e ("drm/panfrost: Add support for GPU heap allocations")
> > Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
>
> Reviewed-by: Steven Price <steven.price@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;
> > }
> > }
> >
>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2023-04-03 6:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-21 9:38 [PATCH] drm/panfrost: Fix the panfrost_mmu_map_fault_addr() error path Boris Brezillon
2021-05-21 9:38 ` Boris Brezillon
2021-05-21 10:42 ` Steven Price
2021-05-21 10:42 ` Steven Price
2023-04-03 6:28 ` Boris Brezillon
2023-04-03 6:28 ` Boris Brezillon
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.