Received: by 10.223.176.5 with SMTP id f5csp1510375wra; Fri, 9 Feb 2018 22:19:45 -0800 (PST) X-Google-Smtp-Source: AH8x224FYHnfDj9G8yZhD5XlyA02udkZV84iUVuprlhoq0InWT58CRjxT5wosedZUD0y+kf/udDZ X-Received: by 10.98.217.141 with SMTP id b13mr5154629pfl.239.1518243584920; Fri, 09 Feb 2018 22:19:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1518243584; cv=none; d=google.com; s=arc-20160816; b=i037aqj7x+cxaI1mdYa+j5we1SfnjUCBZbuB8D44Vpp91wm7uXpP3X42k90cdlptJX IVTq/n7R1yLc0gG4/91+YLi+4OwjKcF6S16nxmJUms0ipOrvJRztTZaKGJo7aBidILJS mZyMnvdX58S/e2okXQyEOoblBO6TJ2m3Olzx72bCnFem7+YTBMYvT5fSgZto5uME4uFg GMKvhi28jNuYYYIXimu0BehQF5BfJyFmg+/tYq04c6xaBmSrwD4dJKK0YEWGJ/O4wnom Zl4vyIl5fmA1HBucHe4r1t5Ep1XfxGkPR+g10EU9O7TOG0Vb7IGOddRg/mi8Y3nezFI+ B16g== 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=1HZpDG09kCb2fP2/EyNVItMooRv0+w1xbQBZVKXFkeY=; b=kaBL2f/wYnNv6ayB83J/kTO31VN4bIJ7JsE0+cA7wKDAiL1nl+kzioYotR5djfvk6k n2LRgwvHHu7hQPmdMvPLOjYoUtnvtnllp5mwy0qpBjkzZXWQCGD7d6RlTfX1tXMyh+8t Q75wkITEtHY6mUaUcxZtZg0OC20GxdeR8aPuCrnvmTbcJHfl1Sb4kNuUqjWQyP3Jwitn iK6ph5jbrIla06gwLNy/a710IzF+qqTmBKlJykitdfsTJN8OGlEg5JCOBsNQAglQBd5x Bh6fXqzZghaqSFzuVQwuo9qKWbt/4PMKW5Qd8l1pofBsv4JoUxUvcu+RfaTgzn9OzDnS sWug== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=I97EcRjo; dkim=pass header.i=@codeaurora.org header.s=default header.b=asM+dsIB; 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 t10-v6si478972plh.350.2018.02.09.22.18.50; Fri, 09 Feb 2018 22:19:44 -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=I97EcRjo; dkim=pass header.i=@codeaurora.org header.s=default header.b=asM+dsIB; 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 S1750934AbeBJGRF (ORCPT + 99 others); Sat, 10 Feb 2018 01:17:05 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:45586 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750761AbeBJGRD (ORCPT ); Sat, 10 Feb 2018 01:17:03 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id 59CBB60B67; Sat, 10 Feb 2018 06:16:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518243423; bh=TBGLTpsnvd3VEmltwYRsNm+8KWTd2gpzbIUZkoS3po0=; h=Date:From:To:cc:Subject:From; b=I97EcRjojxZvBJVSZWk5nM7+gvt9TEodrs+qOJXBTDdJvwQIXZro1s7nranpBpc4N Amzc3ZIziqnVxvMnPoLvVsw4zKaCtcR1135n0A/zdqdFsWs5mF473BIsvijsbQCclo I15PKVubBFtgclfgORQD7GOvweyw/vJJ8Xcwzl10= 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 6CEA0609EF; Sat, 10 Feb 2018 06:16:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1518243417; bh=TBGLTpsnvd3VEmltwYRsNm+8KWTd2gpzbIUZkoS3po0=; h=Date:From:To:cc:Subject:From; b=asM+dsIBH63g+IaAjYEYqWY7k6+3zv7Fs247j6OzYQ9AqJ4kxS67L5fdnfVJFismr FCFqKKiE+xCH91IgYpmjmpqh285+TyT7QUGWbAL8ywZnu/DnvwbvR7CjER/oprnYdX UtZPPFCYFvm3vJUV8vZmgD9JWmLsvTXSGRGsrVtg= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org 6CEA0609EF 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, 9 Feb 2018 22:16:56 -0800 (PST) From: Liam Mark X-X-Sender: lmark@lmark-linux.qualcomm.com To: Laura Abbott , Sumit Semwal cc: linux-kernel@vger.kernel.org, devel@driverdev.osuosl.org, linaro-mm-sig@lists.linaro.org Subject: [PATCH] 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. Fixes: 17fd283f3870 ("staging: android: ion: Duplicate sg_table") Signed-off-by: Liam Mark --- 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 f480885e346b..3ace3a0d9210 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -197,7 +197,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