Skip to content

Commit

Permalink
dma-mapping: fix dma_sync_single_range_*
Browse files Browse the repository at this point in the history
dma_sync_single_range_for_cpu() and dma_sync_single_range_for_device() use
a wrong address with a partial synchronization.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
FUJITA Tomonori authored and Linus Torvalds committed May 12, 2010
1 parent fc2a093 commit f33d7e2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/asm-generic/dma-mapping-common.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ static inline void dma_sync_single_range_for_cpu(struct device *dev,
debug_dma_sync_single_range_for_cpu(dev, addr, offset, size, dir);

} else
dma_sync_single_for_cpu(dev, addr, size, dir);
dma_sync_single_for_cpu(dev, addr + offset, size, dir);
}

static inline void dma_sync_single_range_for_device(struct device *dev,
Expand All @@ -148,7 +148,7 @@ static inline void dma_sync_single_range_for_device(struct device *dev,
debug_dma_sync_single_range_for_device(dev, addr, offset, size, dir);

} else
dma_sync_single_for_device(dev, addr, size, dir);
dma_sync_single_for_device(dev, addr + offset, size, dir);
}

static inline void
Expand Down

0 comments on commit f33d7e2

Please sign in to comment.