All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path
@ 2018-04-23  9:54 Dmitry Osipenko
  2018-04-23  9:58 ` Mikko Perttunen
  2018-05-14  8:45   ` Thierry Reding
  0 siblings, 2 replies; 4+ messages in thread
From: Dmitry Osipenko @ 2018-04-23  9:54 UTC (permalink / raw)
  To: Thierry Reding; +Cc: Mikko Perttunen, dri-devel, linux-tegra, linux-kernel

If IOVA allocation or IOMMU mapping fails, dma_free_wc() is invoked with
size=0 because of a typo, that triggers "kernel BUG at mm/vmalloc.c:124!".

Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
 drivers/gpu/host1x/cdma.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
index 93df28228721..0724122afeac 100644
--- a/drivers/gpu/host1x/cdma.c
+++ b/drivers/gpu/host1x/cdma.c
@@ -127,7 +127,7 @@ static int host1x_pushbuffer_init(struct push_buffer *pb)
 iommu_free_iova:
 	__free_iova(&host1x->iova, alloc);
 iommu_free_mem:
-	dma_free_wc(host1x->dev, pb->alloc_size, pb->mapped, pb->phys);
+	dma_free_wc(host1x->dev, size, pb->mapped, pb->phys);
 
 	return err;
 }
-- 
2.17.0

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path
  2018-04-23  9:54 [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path Dmitry Osipenko
@ 2018-04-23  9:58 ` Mikko Perttunen
  2018-05-14  8:45   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Mikko Perttunen @ 2018-04-23  9:58 UTC (permalink / raw)
  To: Dmitry Osipenko, Thierry Reding
  Cc: Mikko Perttunen, dri-devel, linux-tegra, linux-kernel

Reviewed-by: Mikko Perttunen <mperttunen@nvidia.com>

On 23.04.2018 12:54, Dmitry Osipenko wrote:
> If IOVA allocation or IOMMU mapping fails, dma_free_wc() is invoked with
> size=0 because of a typo, that triggers "kernel BUG at mm/vmalloc.c:124!".
>
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/gpu/host1x/cdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/host1x/cdma.c b/drivers/gpu/host1x/cdma.c
> index 93df28228721..0724122afeac 100644
> --- a/drivers/gpu/host1x/cdma.c
> +++ b/drivers/gpu/host1x/cdma.c
> @@ -127,7 +127,7 @@ static int host1x_pushbuffer_init(struct push_buffer *pb)
>  iommu_free_iova:
>  	__free_iova(&host1x->iova, alloc);
>  iommu_free_mem:
> -	dma_free_wc(host1x->dev, pb->alloc_size, pb->mapped, pb->phys);
> +	dma_free_wc(host1x->dev, size, pb->mapped, pb->phys);
>
>  	return err;
>  }
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path
  2018-04-23  9:54 [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path Dmitry Osipenko
@ 2018-05-14  8:45   ` Thierry Reding
  2018-05-14  8:45   ` Thierry Reding
  1 sibling, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2018-05-14  8:45 UTC (permalink / raw)
  To: Dmitry Osipenko; +Cc: linux-tegra, linux-kernel, dri-devel, Mikko Perttunen


[-- Attachment #1.1: Type: text/plain, Size: 402 bytes --]

On Mon, Apr 23, 2018 at 12:54:56PM +0300, Dmitry Osipenko wrote:
> If IOVA allocation or IOMMU mapping fails, dma_free_wc() is invoked with
> size=0 because of a typo, that triggers "kernel BUG at mm/vmalloc.c:124!".
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/gpu/host1x/cdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path
@ 2018-05-14  8:45   ` Thierry Reding
  0 siblings, 0 replies; 4+ messages in thread
From: Thierry Reding @ 2018-05-14  8:45 UTC (permalink / raw)
  To: Dmitry Osipenko; +Cc: Mikko Perttunen, dri-devel, linux-tegra, linux-kernel

[-- Attachment #1: Type: text/plain, Size: 402 bytes --]

On Mon, Apr 23, 2018 at 12:54:56PM +0300, Dmitry Osipenko wrote:
> If IOVA allocation or IOMMU mapping fails, dma_free_wc() is invoked with
> size=0 because of a typo, that triggers "kernel BUG at mm/vmalloc.c:124!".
> 
> Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
> ---
>  drivers/gpu/host1x/cdma.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Applied, thanks.

Thierry

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-05-14  8:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-23  9:54 [PATCH v1] gpu: host1x: Fix dma_free_wc() argument in the error path Dmitry Osipenko
2018-04-23  9:58 ` Mikko Perttunen
2018-05-14  8:45 ` Thierry Reding
2018-05-14  8:45   ` Thierry Reding

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.