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@codeaurora.org Acked-by: Laura Abbott labbott@redhat.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); }
linaro-mm-sig@lists.linaro.org