diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2007-10-17 12:06:18 +0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-17 12:06:18 +0400 |
commit | 9e91fdb32d449a6b57f8236a793ae2f3df79b4d8 (patch) | |
tree | a375e906206970bbd09b6d0b91138d1f66cc7de5 /lib | |
parent | 24c31eede658c30e4fcc93505589fd519c3aa4b8 (diff) | |
download | linux-9e91fdb32d449a6b57f8236a793ae2f3df79b4d8.tar.xz |
swiotlb: fix map_sg failure handling
sg list elements might not be continuous.
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/swiotlb.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index c419ecf334c3..752fd95323f3 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c @@ -696,7 +696,7 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sgl, int nelems, /* Don't panic here, we expect map_sg users to do proper error handling. */ swiotlb_full(hwdev, sg->length, dir, 0); - swiotlb_unmap_sg(hwdev, sg - i, i, dir); + swiotlb_unmap_sg(hwdev, sgl, i, dir); sgl[0].dma_length = 0; return 0; } |