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 A1B1EC43603 for ; Tue, 10 Dec 2019 00:56:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 580C42077B for ; Tue, 10 Dec 2019 00:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1575939391; bh=BbLBjR8wcrsANoTlWrEqQPyK+DvAKxv254F1InccAcs=; h=Date:From:To:Cc:Subject:In-Reply-To:References:List-ID:From; b=TP/1cwoynyDAE/DOtokOegoPBIuetbmTSh+1QGhVxn9PKEn3bJaCuigM4DulCYtzb 2tDJfdMa6Smypieg5Va5rhkY9hJiERquWNljykEL4cHlypvLnkYH/wu4bnS2/cnqvp 51mIInistG6Xh+VFTgJzru5k0GQRz64PzE4K37I4= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727220AbfLJA4b (ORCPT ); Mon, 9 Dec 2019 19:56:31 -0500 Received: from mail.kernel.org ([198.145.29.99]:43384 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726743AbfLJA4a (ORCPT ); Mon, 9 Dec 2019 19:56:30 -0500 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 Sender: bpf-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org 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.