* [PATCH 4/4] Talitos: fix the issue of dma memory leak
@ 2012-07-10 6:00 Qiang Liu
2012-07-10 21:25 ` [linuxppc-release] " Timur Tabi
2012-07-11 7:09 ` Geanta Neag Horia Ioan-B05471
0 siblings, 2 replies; 5+ messages in thread
From: Qiang Liu @ 2012-07-10 6:00 UTC (permalink / raw)
To: linux-crypto, linuxppc-dev; +Cc: Qiang Liu, Herbert Xu, David S. Miller
An error will be happened when test with mass data:
"DMA-API: device driver tries to sync DMA memory it has not allocated";
"DMA-API: debugging out of memory - disabling"
dma mapping memory of request->desc is not released by right device,
it should be private->dev but not dev;
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Qiang Liu <qiang.liu@freescale.com>
---
drivers/crypto/talitos.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
index 81f8497..a7da48c 100644
--- a/drivers/crypto/talitos.c
+++ b/drivers/crypto/talitos.c
@@ -264,7 +264,7 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch)
else
status = error;
- dma_unmap_single(dev, request->dma_desc,
+ dma_unmap_single(priv->dev, request->dma_desc,
sizeof(struct talitos_desc),
DMA_BIDIRECTIONAL);
--
1.7.5.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [linuxppc-release] [PATCH 4/4] Talitos: fix the issue of dma memory leak
2012-07-10 6:00 [PATCH 4/4] Talitos: fix the issue of dma memory leak Qiang Liu
@ 2012-07-10 21:25 ` Timur Tabi
2012-07-11 2:30 ` Liu Qiang-B32616
2012-07-11 7:09 ` Geanta Neag Horia Ioan-B05471
1 sibling, 1 reply; 5+ messages in thread
From: Timur Tabi @ 2012-07-10 21:25 UTC (permalink / raw)
To: Qiang Liu; +Cc: Herbert Xu, linuxppc-dev, linux-crypto, David S. Miller
Qiang Liu wrote:
> An error will be happened when test with mass data:
Please don't use the phrase "fix the issue" in patch summaries. It's
redundant.
This patch should be titled,
"drivers/crypto: fix memory leak in Talitos driver"
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 81f8497..a7da48c 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -264,7 +264,7 @@ static void flush_channel(struct device *dev, int ch, int error, int reset_ch)
> else
> status = error;
>
> - dma_unmap_single(dev, request->dma_desc,
> + dma_unmap_single(priv->dev, request->dma_desc,
You have an indentation problem here.
--
Timur Tabi
Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [linuxppc-release] [PATCH 4/4] Talitos: fix the issue of dma memory leak
2012-07-10 21:25 ` [linuxppc-release] " Timur Tabi
@ 2012-07-11 2:30 ` Liu Qiang-B32616
0 siblings, 0 replies; 5+ messages in thread
From: Liu Qiang-B32616 @ 2012-07-11 2:30 UTC (permalink / raw)
To: Tabi Timur-B04825
Cc: Herbert Xu, David S. Miller, linuxppc-dev, linux-crypto, Li Yang-R58472
> -----Original Message-----
> From: Tabi Timur-B04825
> Sent: Wednesday, July 11, 2012 5:26 AM
> To: Liu Qiang-B32616
> Cc: linux-crypto@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Herbert
> Xu; Li Yang-R58472; David S. Miller
> Subject: Re: [linuxppc-release] [PATCH 4/4] Talitos: fix the issue of dma
> memory leak
>=20
> Qiang Liu wrote:
> > An error will be happened when test with mass data:
>=20
> Please don't use the phrase "fix the issue" in patch summaries. It's
> redundant.
>=20
> This patch should be titled,
>=20
> "drivers/crypto: fix memory leak in Talitos driver"
>=20
> > diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index
> > 81f8497..a7da48c 100644
> > --- a/drivers/crypto/talitos.c
> > +++ b/drivers/crypto/talitos.c
> > @@ -264,7 +264,7 @@ static void flush_channel(struct device *dev, int
> ch, int error, int reset_ch)
> > else
> > status =3D error;
> >
> > - dma_unmap_single(dev, request->dma_desc,
> > + dma_unmap_single(priv->dev, request->dma_desc,
>=20
> You have an indentation problem here.
My fault, I will correct it and resend again. Thanks.
>=20
> --
> Timur Tabi
> Linux kernel developer at Freescale
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 4/4] Talitos: fix the issue of dma memory leak
2012-07-10 6:00 [PATCH 4/4] Talitos: fix the issue of dma memory leak Qiang Liu
2012-07-10 21:25 ` [linuxppc-release] " Timur Tabi
@ 2012-07-11 7:09 ` Geanta Neag Horia Ioan-B05471
2012-07-11 7:18 ` Liu Qiang-B32616
1 sibling, 1 reply; 5+ messages in thread
From: Geanta Neag Horia Ioan-B05471 @ 2012-07-11 7:09 UTC (permalink / raw)
To: Liu Qiang-B32616
Cc: Li Yang-R58472, Phillips Kim-R1AAHA, Herbert Xu, linux-crypto,
linuxppc-dev, David S. Miller
On Tue, 10 Jul 2012 09:00:14 +0300, Qiang Liu <qiang.liu@freescale.com> wro=
te:
> An error will be happened when test with mass data:
> "DMA-API: device driver tries to sync DMA memory it has not allocated";
> "DMA-API: debugging out of memory - disabling"
> dma mapping memory of request->desc is not released by right device,
> it should be private->dev but not dev;
>=20
> Cc: Herbert Xu <herbert@gondor.apana.org.au>
> Cc: David S. Miller <davem@davemloft.net>
> Signed-off-by: Qiang Liu <qiang.liu@freescale.com>
> ---
> drivers/crypto/talitos.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
> diff --git a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c
> index 81f8497..a7da48c 100644
> --- a/drivers/crypto/talitos.c
> +++ b/drivers/crypto/talitos.c
> @@ -264,7 +264,7 @@ static void flush_channel(struct device *dev, int
> ch, int error, int reset_ch)
> else
> status =3D error;
> - dma_unmap_single(dev, request->dma_desc,
> + dma_unmap_single(priv->dev, request->dma_desc,
> sizeof(struct talitos_desc),
> DMA_BIDIRECTIONAL);
Are you sure this fix applies to the upstream version of talitos?
(i.e. have you encountered the error while running on cryptodev.git ?)
Looks to me this is a fix for the not-upstreamed-yet NAPI patch
(which needs to be reworked according to Dave's feedback).
When you respin the patch series, consider removing this one.
Cheers,
Horia
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: [PATCH 4/4] Talitos: fix the issue of dma memory leak
2012-07-11 7:09 ` Geanta Neag Horia Ioan-B05471
@ 2012-07-11 7:18 ` Liu Qiang-B32616
0 siblings, 0 replies; 5+ messages in thread
From: Liu Qiang-B32616 @ 2012-07-11 7:18 UTC (permalink / raw)
To: Geanta Neag Horia Ioan-B05471
Cc: Li Yang-R58472, Phillips Kim-R1AAHA, Herbert Xu, linux-crypto,
linuxppc-dev, David S. Miller
> -----Original Message-----
> From: Geanta Neag Horia Ioan-B05471
> Sent: Wednesday, July 11, 2012 3:09 PM
> To: Liu Qiang-B32616
> Cc: linux-crypto@vger.kernel.org; linuxppc-dev@lists.ozlabs.org; Li Yang-
> R58472; Phillips Kim-R1AAHA; Herbert Xu; David S. Miller
> Subject: RE: [PATCH 4/4] Talitos: fix the issue of dma memory leak
>=20
> On Tue, 10 Jul 2012 09:00:14 +0300, Qiang Liu <qiang.liu@freescale.com>
> wrote:
> > An error will be happened when test with mass data:
> > "DMA-API: device driver tries to sync DMA memory it has not
> > allocated";
> > "DMA-API: debugging out of memory - disabling"
> > dma mapping memory of request->desc is not released by right device,
> > it should be private->dev but not dev;
> >
> > Cc: Herbert Xu <herbert@gondor.apana.org.au>
> > Cc: David S. Miller <davem@davemloft.net>
> > Signed-off-by: Qiang Liu <qiang.liu@freescale.com>
> > ---
> > drivers/crypto/talitos.c | 2 +-
> > 1 files changed, 1 insertions(+), 1 deletions(-) diff --git
> > a/drivers/crypto/talitos.c b/drivers/crypto/talitos.c index
> > 81f8497..a7da48c 100644
> > --- a/drivers/crypto/talitos.c
> > +++ b/drivers/crypto/talitos.c
> > @@ -264,7 +264,7 @@ static void flush_channel(struct device *dev, int
> > ch, int error, int reset_ch)
> > else
> > status =3D error;
> > - dma_unmap_single(dev, request->dma_desc,
> > + dma_unmap_single(priv->dev, request->dma_desc,
> > sizeof(struct talitos_desc),
> > DMA_BIDIRECTIONAL);
>=20
> Are you sure this fix applies to the upstream version of talitos?
> (i.e. have you encountered the error while running on cryptodev.git ?)
>=20
I found it on our own git, I'm going to test it. I will send the result lat=
er.
Thanks.
> Looks to me this is a fix for the not-upstreamed-yet NAPI patch (which
> needs to be reworked according to Dave's feedback).
>=20
> When you respin the patch series, consider removing this one.
Thanks for your mention, I will remove it if I cannot reproduce it.
> Cheers,
> Horia
>=20
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-07-11 7:18 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-10 6:00 [PATCH 4/4] Talitos: fix the issue of dma memory leak Qiang Liu
2012-07-10 21:25 ` [linuxppc-release] " Timur Tabi
2012-07-11 2:30 ` Liu Qiang-B32616
2012-07-11 7:09 ` Geanta Neag Horia Ioan-B05471
2012-07-11 7:18 ` Liu Qiang-B32616
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).