Skip to contentSkip to conversation

Patch "async_pq_val: fix DMA memory leak" has been added to the 4.7-stable tree

PATCH [email protected] 1 participant 1 message Oct 20, 2016

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

async_pq_val: fix DMA memory leak

to the 4.7-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
async_pq_val-fix-dma-memory-leak.patch
and it can be found in the queue-4.7 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From c84750906b4818d4929fbf73a4ae6c113b94f52b Mon Sep 17 00:00:00 2001

From: Justin Maggard <[email protected]>
Date: Tue, 4 Oct 2016 13:17:58 -0700
Subject: async_pq_val: fix DMA memory leak

From: Justin Maggard <[email protected]>

commit c84750906b4818d4929fbf73a4ae6c113b94f52b upstream.

Add missing dmaengine_unmap_put(), so we don't OOM during RAID6 sync.

Fixes 1786b943dad0 ("async_pq_val: convert to dmaengine_unmap_data")
---
 crypto/async_tx/async_pq.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
crypto/async_tx/async_pq.c +4 -4
@@ -368,8 +368,6 @@ async_syndrome_val(struct page **blocks,
 
 		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,
 		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);
 

Patches currently in stable-queue which might be from [email protected] are

queue-4.7/async_pq_val-fix-dma-memory-leak.patch