Received: by 10.223.185.116 with SMTP id b49csp1094764wrg; Fri, 16 Feb 2018 12:20:51 -0800 (PST) X-Google-Smtp-Source: AH8x224l3MkyGnEmkybKcmIvxqQEwihnh/o680re78bPjJy3r7QvMll4FM7/vO71k5HXccPJ3LD6 X-Received: by 10.101.65.9 with SMTP id w9mr6081376pgp.214.1518812451321; Fri, 16 Feb 2018 12:20:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518812451; cv=none; d=google.com; s=arc-20160816; b=kZIZUY2b/vHARq54NCkIkOiW0Ahvbo/XWP0ZMezxV0SWq/Y5XWOLZL1TGAGWmIsUMe FWay6Vuq7jWZL47AHiVtTb8b+l8ZMSe/zyWk4+Eoa4nYUpjqHZFz+I6chPPw525cRum+ C0PWzJmjePAYXoN1pH4F0W0kzvKC0aDhWUNoXuHzxVDM9onQrhUO97Zjr7hCC9RrRPzm kot6Whk2EHShnPGMTRYVuCyZeIiuJV0+IWb3zPeO8WNdcIwucUVz6PjkPnooLutfoAMJ ecdqtEEk4lAFgdIVBYEfp/Pg3IdM+ofdh1peA8pKLQTaZT92VTesg71fWFMnkzVWWQsl drIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:message-id :subject:cc:to:from:date:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=+K/DRc8SmJt2poR9h3G3Gf32XwjekOVL51yDMYprWtQ=; b=wnD0RaBZ8czc2/WthRfNlRiS92m/pWp71Vd4NPHrKzy7g9E1N8Z5zghOpCjJqCQWxz PWQsGnUpAE4gf1Qdnz9A2fyUWFB6sctbA4q7T7QS1GrMW+O/PuCfCzBc/ObYXLFz3kl9 NqrnFc+hU56m6kQKm/kVsIkhzfYln8ygJzjb7GBkrhq0M1tHtIQSqkM60YY8d7Y/Yakc 5tjJGJNh7U90/UT4oBTTtz4LlCM0/eF1nBz+uV7pKjx2eI04cAixDkad4WasEf1+FI8L 2zZG7KcNAfnLNUunZpUFvXqutwTSntUXLxIlBRwyXr5uXBJgzPGnQe4AcYYE1cHPg9q4 FurA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=LsfyssRJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=S8uMPT71; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t134si6980pgc.664.2018.02.16.12.20.36; Fri, 16 Feb 2018 12:20:51 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=LsfyssRJ; dkim=pass header.i=@codeaurora.org header.s=default header.b=S8uMPT71; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750859AbeBPUT0 (ORCPT + 99 others); Fri, 16 Feb 2018 15:19:26 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:39248 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750713AbeBPUTY (ORCPT ); Fri, 16 Feb 2018 15:19:24 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 4A8F960585; Fri, 16 Feb 2018 20:19:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518812364; bh=4vTEBLwcMRVdspM306ner4mj4TkNl9A+dOc04K3nr2Y=; h=Date:From:To:cc:Subject:From; b=LsfyssRJHBy/k5oxZ/osMREZJO5Xgybd324/TCOUSDsBfUQ/COmdwNSjSIl9IPz5c qjzmdEZUUEJpayz/WfECqabyi+GdbR+knDeDzOyHU6TGMRB79sW1nIaoDOhw/HatHf vGhIPIlvCHIf+oHuL9xwwYraaFV5tQHep8Fui1hs= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from lmark-linux.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: lmark@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id 1413A60585; Fri, 16 Feb 2018 20:19:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518812363; bh=4vTEBLwcMRVdspM306ner4mj4TkNl9A+dOc04K3nr2Y=; h=Date:From:To:cc:Subject:From; b=S8uMPT71cNx3KkgNiXhtknUvufVS+3Jj71ZKkCLLWxGocpZV7t0z4Vokdyycs9Mnm s1H7Q0muGUoC5rpUITjAhIPZbALTNgqPRqygH+BYaAPnFF+dSb3MXQANucVqHNsMNV US4M7L6G7RehDGCzHixVtYaxDL1Tv/oXoal2RqBs= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 1413A60585 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=lmark@codeaurora.org Date: Fri, 16 Feb 2018 12:19:22 -0800 (PST) From: Liam Mark X-X-Sender: lmark@lmark-linux.qualcomm.com To: Laura Abbott , Sumit Semwal cc: Dan Carpenter , Greg KH , linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH v2] staging: android: ion: Initialize dma_address of new sg list Message-ID: User-Agent: Alpine 2.02 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Acked-by: Laura Abbott --- 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