linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ASYNC_TX: fix the bug in async_tx_run_dependencies
@ 2008-09-03 21:43 Ilya Yanok
  2008-09-04 21:19 ` Andrew Morton
  2008-09-05 13:06 ` Wolfgang Denk
  0 siblings, 2 replies; 8+ messages in thread
From: Ilya Yanok @ 2008-09-03 21:43 UTC (permalink / raw)
  To: linux-raid; +Cc: linux-kernel, wd, Yuri Tikhonov

From: Yuri Tikhonov <yur@emcraft.com>

Should clear the next pointer of the TX if we are sure that the
next TX (say NXT) will be submitted to the channel too. Overwise,
we break the chain of descriptors, because we lose the information
about the next descriptor to run. So next time, when invoke
async_tx_run_dependencies() with TX, it's TX->next will be NULL, and
NXT will be never submitted.

Signed-off-by: Yuri Tikhonov <yur@emcraft.com>
---
 crypto/async_tx/async_tx.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/crypto/async_tx/async_tx.c b/crypto/async_tx/async_tx.c
index 85eaf7b..e8362c1 100644
--- a/crypto/async_tx/async_tx.c
+++ b/crypto/async_tx/async_tx.c
@@ -137,7 +137,8 @@ async_tx_run_dependencies(struct dma_async_tx_descriptor *tx)
 		spin_lock_bh(&next->lock);
 		next->parent = NULL;
 		_next = next->next;
-		next->next = NULL;
+		if (_next && _next->chan == chan)
+			next->next = NULL;
 		spin_unlock_bh(&next->lock);
 
 		next->tx_submit(next);
-- 
1.5.6.3


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

end of thread, other threads:[~2008-09-05 13:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 21:43 [PATCH] ASYNC_TX: fix the bug in async_tx_run_dependencies Ilya Yanok
2008-09-04 21:19 ` Andrew Morton
2008-09-04 23:24   ` Dan Williams
2008-09-05  0:03     ` Dan Williams
2008-09-05 10:17       ` Ilya Yanok
2008-09-05  9:15   ` Ilya Yanok
2008-09-05 13:06 ` Wolfgang Denk
2008-09-05 13:16   ` Ilya Yanok

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).