Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=bdb02504f473be6a785741093913ea2acd05626f
Commit:     bdb02504f473be6a785741093913ea2acd05626f
Parent:     8bf50f71cbfc7d043f0f135da72b3feefeaa0eb8
Author:     FUJITA Tomonori <[EMAIL PROTECTED]>
AuthorDate: Wed Oct 17 10:51:20 2007 +0200
Committer:  Jens Axboe <[EMAIL PROTECTED]>
CommitDate: Wed Oct 17 10:51:20 2007 +0200

    IA64: iommu uses sg_next with an invalid sg element
    
    sg list elements might not be continuous.
    
    Signed-off-by: FUJITA Tomonori <[EMAIL PROTECTED]>
    Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>
---
 arch/ia64/hp/common/sba_iommu.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c
index 4338f41..3c95f41 100644
--- a/arch/ia64/hp/common/sba_iommu.c
+++ b/arch/ia64/hp/common/sba_iommu.c
@@ -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,7 +1200,8 @@ sba_fill_pdir(
                        u32 pide = startsg->dma_address & ~PIDE_FLAG;
                        dma_offset = (unsigned long) pide & ~iovp_mask;
                        startsg->dma_address = 0;
-                       dma_sg = sg_next(dma_sg);
+                       if (n_mappings)
+                               dma_sg = sg_next(dma_sg);
                        dma_sg->dma_address = pide | ioc->ibase;
                        pdirp = &(ioc->pdir_base[pide >> iovp_shift]);
                        n_mappings++;
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to