mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] staging: android: ion: Initialize dma_address of new sg list
@ 2018-02-16 20:19 Liam Mark
  0 siblings, 0 replies; only message in thread
From: Liam Mark @ 2018-02-16 20:19 UTC (permalink / raw)
  To: Laura Abbott, Sumit Semwal
  Cc: devel, Greg KH, linaro-mm-sig, linux-kernel, Dan Carpenter

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);
 	}
 
-- 
1.8.5.2


Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2018-02-16 20:19 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-16 20:19 [PATCH v2] staging: android: ion: Initialize dma_address of new sg list Liam Mark

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

all inboxes | Powered by JetHome®