From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-0.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3083C2BD09 for ; Tue, 10 Dec 2019 00:56:31 +0000 (UTC) Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.kernel.org (Postfix) with ESMTP id 6B2C520828 for ; Tue, 10 Dec 2019 00:56:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="uQ6utAA3" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6B2C520828 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-foundation.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=owner-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix) id F02516B29A3; Mon, 9 Dec 2019 19:56:30 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id EB2E56B29A4; Mon, 9 Dec 2019 19:56:30 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DC8D06B29A5; Mon, 9 Dec 2019 19:56:30 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from forelay.hostedemail.com (smtprelay0099.hostedemail.com [216.40.44.99]) by kanga.kvack.org (Postfix) with ESMTP id C737A6B29A3 for ; Mon, 9 Dec 2019 19:56:30 -0500 (EST) Received: from smtpin03.hostedemail.com (10.5.19.251.rfc1918.com [10.5.19.251]) by forelay03.hostedemail.com (Postfix) with SMTP id 8324A8249980 for ; Tue, 10 Dec 2019 00:56:30 +0000 (UTC) X-FDA: 76247416140.03.bomb78_38c86b67cb22d X-HE-Tag: bomb78_38c86b67cb22d X-Filterd-Recvd-Size: 3864 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by imf03.hostedemail.com (Postfix) with ESMTP for ; Tue, 10 Dec 2019 00:56:30 +0000 (UTC) Received: from localhost.localdomain (c-73-231-172-41.hsd1.ca.comcast.net [73.231.172.41]) (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 CE73720637; Tue, 10 Dec 2019 00:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575939389; bh=BbLBjR8wcrsANoTlWrEqQPyK+DvAKxv254F1InccAcs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=uQ6utAA370KB9xY5+qeGGsoo1HH/Hnt/LDZgeHbTSoRMRHkI8VQJNf4H7ZKlSmj42 WZSNKaK/IM6JgWSl9QfalBJQuyJfmeZpwpLLwj0NmbsOrQL4FJSoG0TjuPsUzwfCOi N9YkLgu4ONG2hyyuwLyRSMczlQwBZdl/iQWpJ6W0= Date: Mon, 9 Dec 2019 16:56:27 -0800 From: Andrew Morton To: John Hubbard Cc: Al Viro , Alex Williamson , Benjamin Herrenschmidt , =?ISO-8859-1?Q?Bj=F6rn_T=F6pel?= , Christoph Hellwig , Dan Williams , Daniel Vetter , Dave Chinner , David Airlie , "David S . Miller" , Ira Weiny , Jan Kara , Jason Gunthorpe , Jens Axboe , Jonathan Corbet , =?ISO-8859-1?Q?J=E9r?= =?ISO-8859-1?Q?=F4me?= Glisse , Magnus Karlsson , "Mauro Carvalho Chehab" , Michael Ellerman , Michal Hocko , Mike Kravetz , "Paul Mackerras" , Shuah Khan , Vlastimil Babka , , , , , , , , , , , , , LKML , "Christoph Hellwig" , Hans Verkuil , Subject: Re: [PATCH v8 17/26] media/v4l2-core: set pages dirty upon releasing DMA buffers Message-Id: <20191209165627.bf657cb8fdf660e8f91e966c@linux-foundation.org> In-Reply-To: <20191209225344.99740-18-jhubbard@nvidia.com> References: <20191209225344.99740-1-jhubbard@nvidia.com> <20191209225344.99740-18-jhubbard@nvidia.com> X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: On Mon, 9 Dec 2019 14:53:35 -0800 John Hubbard wrote: > After DMA is complete, and the device and CPU caches are synchronized, > it's still required to mark the CPU pages as dirty, if the data was > coming from the device. However, this driver was just issuing a > bare put_page() call, without any set_page_dirty*() call. > > Fix the problem, by calling set_page_dirty_lock() if the CPU pages > were potentially receiving data from the device. > > Reviewed-by: Christoph Hellwig > Acked-by: Hans Verkuil > Cc: Mauro Carvalho Chehab > Cc: What are the user-visible effects of this change? As it's cc:stable I'd normally send this to Linus within 1-2 weeks, or sooner. Please confirm that this is a standalone fix, independent of the rest of this series.