aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/async_tx.h
diff options
context:
space:
mode:
authorDan Williams <dan.j.williams@intel.com>2007-07-20 03:31:46 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-20 11:44:19 -0400
commiteb0645a8b1f14da300f40bb9f424640cd1181fbf (patch)
tree462789626fcd1775bec80d74d19bcd68797589c8 /include/linux/async_tx.h
parent7c6129c68fe90a61166800b40217a850b8faee98 (diff)
async_tx: fix kmap_atomic usage in async_memcpy
Andrew Morton: [async_memcpy] is very wrong if both ASYNC_TX_KMAP_DST and ASYNC_TX_KMAP_SRC can ever be set. We'll end up using the same kmap slot for both src add dest and we get either corrupted data or a BUG. Evgeniy Polyakov: Btw, shouldn't it always be kmap_atomic() even if flag is not set. That pages are usual one returned by alloc_page(). So fix the usage of kmap_atomic and kill the ASYNC_TX_KMAP_DST and ASYNC_TX_KMAP_SRC flags. Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Evgeniy Polyakov <johnpol@2ka.mipt.ru> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/async_tx.h')
-rw-r--r--include/linux/async_tx.h6
1 files changed, 0 insertions, 6 deletions
diff --git a/include/linux/async_tx.h b/include/linux/async_tx.h
index ff1255079fa1..bdca3f1b3213 100644
--- a/include/linux/async_tx.h
+++ b/include/linux/async_tx.h
@@ -51,10 +51,6 @@ struct dma_chan_ref {
51 * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a 51 * @ASYNC_TX_ACK: immediately ack the descriptor, precludes setting up a
52 * dependency chain 52 * dependency chain
53 * @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining. 53 * @ASYNC_TX_DEP_ACK: ack the dependency descriptor. Useful for chaining.
54 * @ASYNC_TX_KMAP_SRC: if the transaction is to be performed synchronously
55 * take an atomic mapping (KM_USER0) on the source page(s)
56 * @ASYNC_TX_KMAP_DST: if the transaction is to be performed synchronously
57 * take an atomic mapping (KM_USER0) on the dest page(s)
58 */ 54 */
59enum async_tx_flags { 55enum async_tx_flags {
60 ASYNC_TX_XOR_ZERO_DST = (1 << 0), 56 ASYNC_TX_XOR_ZERO_DST = (1 << 0),
@@ -62,8 +58,6 @@ enum async_tx_flags {
62 ASYNC_TX_ASSUME_COHERENT = (1 << 2), 58 ASYNC_TX_ASSUME_COHERENT = (1 << 2),
63 ASYNC_TX_ACK = (1 << 3), 59 ASYNC_TX_ACK = (1 << 3),
64 ASYNC_TX_DEP_ACK = (1 << 4), 60 ASYNC_TX_DEP_ACK = (1 << 4),
65 ASYNC_TX_KMAP_SRC = (1 << 5),
66 ASYNC_TX_KMAP_DST = (1 << 6),
67}; 61};
68 62
69#ifdef CONFIG_DMA_ENGINE 63#ifdef CONFIG_DMA_ENGINE