From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: [PATCH 1/3] mm/gup: introduce __put_user_pages() Date: Tue, 23 Jul 2019 17:36:40 +0200 Message-ID: <20190723153640.GB720@lst.de> References: <20190722223415.13269-1-jhubbard@nvidia.com> <20190722223415.13269-2-jhubbard@nvidia.com> <20190723055359.GC17148@lst.de> <8ab4899c-ec12-a713-cac2-d951fff2a347@nvidia.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <8ab4899c-ec12-a713-cac2-d951fff2a347@nvidia.com> Sender: linux-kernel-owner@vger.kernel.org To: John Hubbard Cc: Christoph Hellwig , john.hubbard@gmail.com, Andrew Morton , Alexander Viro , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Boaz Harrosh , Daniel Vetter , Dan Williams , Dave Chinner , David Airlie , "David S . Miller" , Ilya Dryomov , Jan Kara , Jason Gunthorpe , Jens Axboe , =?iso-8859-1?B?Suly9G1l?= Glisse , Johannes Thumshirn , Magnus Karlsson , Matthew Wilcox , Miklos Szeredi , Ming List-Id: dri-devel@lists.freedesktop.org On Mon, Jul 22, 2019 at 11:33:32PM -0700, John Hubbard wrote: > I'm seeing about 18 places where set_page_dirty() is used, in the call site > conversions so far, and about 20 places where set_page_dirty_lock() is > used. So without knowing how many of the former (if any) represent bugs, > you can see why the proposal here supports both DIRTY and DIRTY_LOCK. Well, it should be fairly easy to audit. set_page_dirty() is only safe if we are dealing with a file backed page where we have reference on the inode it hangs off. Which should basically be never or almost never.