Skip to content

Commit de24125

Browse files
yuri-tikhonovdjbw
authored andcommitted
async_tx: fix the bug in async_tx_run_dependencies
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. Cc: <stable@kernel.org> [2.6.26] Signed-off-by: Yuri Tikhonov <yur@emcraft.com> Signed-off-by: Ilya Yanok <yanok@emcraft.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com>
1 parent b380b0d commit de24125

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎crypto/async_tx/async_tx.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,8 @@ async_tx_run_dependencies(struct dma_async_tx_descriptor *tx)
137137
spin_lock_bh(&next->lock);
138138
next->parent = NULL;
139139
_next = next->next;
140-
next->next = NULL;
140+
if (_next && _next->chan == chan)
141+
next->next = NULL;
141142
spin_unlock_bh(&next->lock);
142143

143144
next->tx_submit(next);

0 commit comments

Comments
 (0)