From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mail-pa0-f52.google.com ([209.85.220.52]:37441 "EHLO mail-pa0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753492AbaDDOxz (ORCPT ); Fri, 4 Apr 2014 10:53:55 -0400 Received: by mail-pa0-f52.google.com with SMTP id rd3so3589357pab.11 for ; Fri, 04 Apr 2014 07:53:55 -0700 (PDT) Date: Fri, 4 Apr 2014 07:52:47 -0700 (PDT) From: Hugh Dickins To: "Kirill A. Shutemov" cc: Hugh Dickins , Linus Torvalds , Andrew Morton , Jan Kara , Roland Dreier , Oleg Nesterov , Konstantin Khlebnikov , "Kirill A. Shutemov" , Mauro Carvalho Chehab , Omar Ramirez Luna , Inki Dae , linux-kernel@vger.kernel.org, linux-mm@kvack.org, linux-rdma@vger.kernel.org, linux-media@vger.kernel.org Subject: Re: [PATCH] mm: get_user_pages(write,force) refuse to COW in shared areas In-Reply-To: <20140404123242.GA22320@node.dhcp.inet.fi> Message-ID: References: <20140404123242.GA22320@node.dhcp.inet.fi> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-media-owner@vger.kernel.org List-ID: On Fri, 4 Apr 2014, Kirill A. Shutemov wrote: > > There's comment in do_wp_page() which is not true anymore with patch > applied. It should be fixed. The * Only catch write-faults on shared writable pages, * read-only shared pages can get COWed by * get_user_pages(.write=1, .force=1). Yes, I went back and forth on that: I found it difficult to remove that comment without also simplifying the VM_WRITE|VM_SHARED test immediately above it, possibly even looking again at the ordering of those tests. In the end I decided to leave changing it to when we do the other little cleanups outside get_user_pages(), after it's become clear whether the new EFAULT is troublesome or not. Most of my testing had been without any change in do_wp_page(), so I left that out. > > Otherwise, looks good to me: > > Acked-by: Kirill A. Shutemov Thanks, Hugh