lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 18 Aug 2016 19:08:42 +0800
From:	Hsin-Yu Chao <hychao@...omium.org>
To:	unlisted-recipients:; (no To-header on input)
Cc:	Hsin-Yu Chao <hychao@...omium.org>,
	Dan Williams <dan.j.williams@...el.com>,
	Vinod Koul <vinod.koul@...el.com>,
	dmaengine@...r.kernel.org (open list:DMA GENERIC OFFLOAD ENGINE
	SUBSYSTEM), linux-kernel@...r.kernel.org (open list)
Subject: [PATCH] dmaengine: pl330: get transfer count for BUSY descriptor in list

A descrptor of status BUSY could stay in pending list with non-zero
number of transferred count. In this case we should query the actual
transfered count or the total residual will be wrong and cause
unexpected hw_ptr move.

Signed-off-by: Hsin-Yu Chao <hychao@...omium.org>
---
 drivers/dma/pl330.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/dma/pl330.c b/drivers/dma/pl330.c
index 4fc3ffb..39230d9 100644
--- a/drivers/dma/pl330.c
+++ b/drivers/dma/pl330.c
@@ -2295,7 +2295,7 @@ pl330_tx_status(struct dma_chan *chan, dma_cookie_t cookie,
 	list_for_each_entry(desc, &pch->work_list, node) {
 		if (desc->status == DONE)
 			transferred = desc->bytes_requested;
-		else if (running && desc == running)
+		else if ((running && desc == running) || (desc->status == BUSY))
 			transferred =
 				pl330_get_current_xferred_count(pch, desc);
 		else
-- 
2.6.6

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ