public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] swiotlb: fix map_sg failure handling
@ 2007-10-17  8:03 FUJITA Tomonori
  2007-10-17  8:05 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: FUJITA Tomonori @ 2007-10-17  8:03 UTC (permalink / raw)
  To: linux-kernel, jens.axboe; +Cc: linux-scsi, tomof

sg list elements might not be continuous.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
---
 lib/swiotlb.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index c419ecf..752fd95 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;
 			}
-- 
1.5.2.4


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

end of thread, other threads:[~2007-10-17  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-17  8:03 [PATCH] swiotlb: fix map_sg failure handling FUJITA Tomonori
2007-10-17  8:05 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox