[<prev] [next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.02.1802161215480.14464@lmark-linux.qualcomm.com>
Date: Fri, 16 Feb 2018 12:19:22 -0800 (PST)
From: Liam Mark <lmark@...eaurora.org>
To: Laura Abbott <labbott@...hat.com>,
Sumit Semwal <sumit.semwal@...aro.org>
cc: Dan Carpenter <dan.carpenter@...cle.com>,
Greg KH <gregkh@...uxfoundation.org>,
linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
linaro-mm-sig@...ts.linaro.org
Subject: [PATCH v2] staging: android: ion: Initialize dma_address of new sg
list
Fix the dup_sg_table function to initialize the dma_address of the new
sg list entries instead of the source dma_address entries.
Since ION duplicates the sg_list this issue does not appear to result in
an actual bug.
Signed-off-by: Liam Mark <lmark@...eaurora.org>
Acked-by: Laura Abbott <labbott@...hat.com>
---
Changes in v2:
- Add to commit message that it doesn't cause an actual bug
- Remove 'Fixes:' since it doesn't cause a bug
- Add Acked-by from Laura Abbott
drivers/staging/android/ion/ion.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c
index 57e0d8035b2e..517d4f40d1b7 100644
--- a/drivers/staging/android/ion/ion.c
+++ b/drivers/staging/android/ion/ion.c
@@ -187,7 +187,7 @@ static struct sg_table *dup_sg_table(struct sg_table *table)
new_sg = new_table->sgl;
for_each_sg(table->sgl, sg, table->nents, i) {
memcpy(new_sg, sg, sizeof(*sg));
- sg->dma_address = 0;
+ new_sg->dma_address = 0;
new_sg = sg_next(new_sg);
}
--
1.8.5.2
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
Powered by blists - more mailing lists