Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit bdb02504 authored by FUJITA Tomonori's avatar FUJITA Tomonori Committed by Jens Axboe
Browse files

IA64: iommu uses sg_next with an invalid sg element



sg list elements might not be continuous.

Signed-off-by: default avatarFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: default avatarJens Axboe <jens.axboe@oracle.com>
parent 8bf50f71
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -1179,7 +1179,6 @@ sba_fill_pdir(
	u64 *pdirp = NULL;
	unsigned long dma_offset = 0;

	dma_sg--;
	while (nents-- > 0) {
		int     cnt = startsg->dma_length;
		startsg->dma_length = 0;
@@ -1201,6 +1200,7 @@ sba_fill_pdir(
			u32 pide = startsg->dma_address & ~PIDE_FLAG;
			dma_offset = (unsigned long) pide & ~iovp_mask;
			startsg->dma_address = 0;
			if (n_mappings)
				dma_sg = sg_next(dma_sg);
			dma_sg->dma_address = pide | ioc->ibase;
			pdirp = &(ioc->pdir_base[pide >> iovp_shift]);