* [PATCH] async_pq_val: fix DMA memory leak
@ 2016-10-04 20:17 Justin Maggard
2016-10-04 20:26 ` Dan Williams
2016-10-05 0:49 ` Vinod Koul
0 siblings, 2 replies; 3+ messages in thread
From: Justin Maggard @ 2016-10-04 20:17 UTC (permalink / raw)
To: dan.j.williams; +Cc: linux-raid, dmaengine, Justin Maggard
Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.
Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
Signed-off-by: Justin Maggard <jmaggard@netgear.com>
---
crypto/async_tx/async_pq.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c
index 08b3ac6..f83de99 100644
--- a/crypto/async_tx/async_pq.c
+++ b/crypto/async_tx/async_pq.c
@@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
dma_set_unmap(tx, unmap);
async_tx_submit(chan, tx, submit);
-
- return tx;
} else {
struct page *p_src = P(blocks, disks);
struct page *q_src = Q(blocks, disks);
@@ -424,9 +422,11 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
submit->cb_param = cb_param_orig;
submit->flags = flags_orig;
async_tx_sync_epilog(submit);
-
- return NULL;
+ tx = NULL;
}
+ dmaengine_unmap_put(unmap);
+
+ return tx;
}
EXPORT_SYMBOL_GPL(async_syndrome_val);
--
2.10.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] async_pq_val: fix DMA memory leak
2016-10-04 20:17 [PATCH] async_pq_val: fix DMA memory leak Justin Maggard
@ 2016-10-04 20:26 ` Dan Williams
2016-10-05 0:49 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Dan Williams @ 2016-10-04 20:26 UTC (permalink / raw)
To: Justin Maggard
Cc: linux-raid, dmaengine@vger.kernel.org, Justin Maggard, Vinod Koul
[ adding Vinod ]
On Tue, Oct 4, 2016 at 1:17 PM, Justin Maggard <jmaggard10@gmail.com> wrote:
> Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.
>
> Fixes: 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
> Signed-off-by: Justin Maggard <jmaggard@netgear.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
> ---
> crypto/async_tx/async_pq.c | 8 ++++----
> 1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/crypto/async_tx/async_pq.c b/crypto/async_tx/async_pq.c
> index 08b3ac6..f83de99 100644
> --- a/crypto/async_tx/async_pq.c
> +++ b/crypto/async_tx/async_pq.c
> @@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
>
> dma_set_unmap(tx, unmap);
> async_tx_submit(chan, tx, submit);
> -
> - return tx;
> } else {
> struct page *p_src = P(blocks, disks);
> struct page *q_src = Q(blocks, disks);
> @@ -424,9 +422,11 @@ async_syndrome_val(struct page **blocks, unsigned int offset, int disks,
> submit->cb_param = cb_param_orig;
> submit->flags = flags_orig;
> async_tx_sync_epilog(submit);
> -
> - return NULL;
> + tx = NULL;
> }
> + dmaengine_unmap_put(unmap);
> +
> + return tx;
> }
> EXPORT_SYMBOL_GPL(async_syndrome_val);
>
> --
> 2.10.1
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] async_pq_val: fix DMA memory leak
2016-10-04 20:17 [PATCH] async_pq_val: fix DMA memory leak Justin Maggard
2016-10-04 20:26 ` Dan Williams
@ 2016-10-05 0:49 ` Vinod Koul
1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2016-10-05 0:49 UTC (permalink / raw)
To: Justin Maggard; +Cc: dan.j.williams, linux-raid, dmaengine, Justin Maggard
On Tue, Oct 04, 2016 at 01:17:58PM -0700, Justin Maggard wrote:
> Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.
Applied, thanks
--
~Vinod
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-05 0:49 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-04 20:17 [PATCH] async_pq_val: fix DMA memory leak Justin Maggard
2016-10-04 20:26 ` Dan Williams
2016-10-05 0:49 ` Vinod Koul
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).