Received: by 2002:a25:f815:0:0:0:0:0 with SMTP id u21csp2251193ybd; Mon, 24 Jun 2019 03:19:16 -0700 (PDT) X-Google-Smtp-Source: APXvYqzKZflZtEMpNxKBTSXLx1NPFH6xWgZMxdIseCJ+xC56QyqbWNROM+dLkpL5sN4osV2l6YrJ X-Received: by 2002:a17:90a:228b:: with SMTP id s11mr23318070pjc.23.1561371556876; Mon, 24 Jun 2019 03:19:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1561371556; cv=none; d=google.com; s=arc-20160816; b=a6y8r6r49yMVFUZ6QtjBofYWUgXm7R2fxzmZAiKqCPO46wQJBJu67NgR415U6b6SnE f3A1dfztXbJhdMDg7yZXuQigaky7bmkWSMcVr1UbHvYfhyZ5NEe6Z/FkOGRl7vCPKb1Y JEABwxr+2co+PRyrn9Lm3UWPhE4Ud17VzibCUXx4Bf24cYF9DQXpDDMlqJOfhR4rscQ+ lB4ja7A76TtkG20ZGh55cKVhcJWZ2Blws19jfgvxNXvrxBKPzS69VOiGi18ZuhZXPw4e 41aMqJUNMU8249y3bspzt7w37gk5httugIne9I/e/39gxgTGbCOAo2ZxV3Viwv8Mqkvi SIWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=X8MTTRxIm1+pnd0ucZSInFMeACUFsyX0+UzPtXELU+s=; b=tmNaQLZV+hI5ddeUY6yrbVj+1fSEyL4mTqL4qWrLa21UbH+65swoWJQhh/2eQXonMM aZHe2usmPEPdg/K6XujRSifRr64iqCe5hzDlujJePFKtALwanAm7mNVuV7omO3TWlVFU yRkWuaVOp1Cx9r+35wHL7WbTueAoME9m712tfYp2CA6bQawSxckLDL5+YUwHq6leqBay crr05nL+6alKjvy1miUHnFEpnPcCLE8rdbsyhgVn9jGHh1LPZEnyUjLydzeFMrfKWCCR 9oib4vFuvSyd889aIHxB2BAoF+mug0o0aKQqyUQXcxAwnjxLNwLJ5DQvUunTK05da+KW 0Jzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=eMhDN5zz; 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 a64si10856875pla.432.2019.06.24.03.19.01; Mon, 24 Jun 2019 03:19:16 -0700 (PDT) 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=@kernel.org header.s=default header.b=eMhDN5zz; 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 S1729770AbfFXKSZ (ORCPT + 99 others); Mon, 24 Jun 2019 06:18:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:53696 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729957AbfFXKQO (ORCPT ); Mon, 24 Jun 2019 06:16:14 -0400 Received: from localhost (f4.8f.5177.ip4.static.sl-reverse.com [119.81.143.244]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 7769D20645; Mon, 24 Jun 2019 10:16:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1561371374; bh=dCYuUHsFqV7uKyvtqq6FlM4P/lhE4gHZNSKblgjLo6E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eMhDN5zzabyzv860nUqicoAPkO7ofjvIn0jqlWHZHvLh71yBBXfK0CObmD+QISFfT 2PTWb2dcW8FcLDP28ixdgxhFlAdUoshs7RusjsMWTbOL1iqpw0tIZHOzgcyFWVnlOC B+Hu+arcuRlGrAZa8wfrSk5zkOq7uFW/rREEad2I= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lucas Stach , Gerd Hoffmann , Sasha Levin Subject: [PATCH 5.1 080/121] udmabuf: actually unmap the scatterlist Date: Mon, 24 Jun 2019 17:56:52 +0800 Message-Id: <20190624092324.958730722@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190624092320.652599624@linuxfoundation.org> References: <20190624092320.652599624@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 283f1e383e91d96fe652fad549537ae15cf31d60 ] unmap_udmabuf fails to actually unmap the scatterlist, leaving dangling mappings around. Fixes: fbb0de795078 ("Add udmabuf misc device") Signed-off-by: Lucas Stach Link: http://patchwork.freedesktop.org/patch/msgid/20190604202331.17482-1-l.stach@pengutronix.de Signed-off-by: Gerd Hoffmann Signed-off-by: Sasha Levin --- drivers/dma-buf/udmabuf.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/dma-buf/udmabuf.c b/drivers/dma-buf/udmabuf.c index cd57747286f2..9635897458a0 100644 --- a/drivers/dma-buf/udmabuf.c +++ b/drivers/dma-buf/udmabuf.c @@ -77,6 +77,7 @@ static void unmap_udmabuf(struct dma_buf_attachment *at, struct sg_table *sg, enum dma_data_direction direction) { + dma_unmap_sg(at->dev, sg->sgl, sg->nents, direction); sg_free_table(sg); kfree(sg); } -- 2.20.1