From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Pekka Enberg" Subject: Re: msync(2) bug(?), returns AOP_WRITEPAGE_ACTIVATE to userland Date: Mon, 22 Oct 2007 23:40:14 +0300 Message-ID: <84144f020710221340n6586b6d6web28cea481809b93@mail.gmail.com> References: <200710142232.l9EMW8kK029572@agora.fsl.cs.sunysb.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: "Erez Zadok" , "Ryan Finnie" , "Andrew Morton" , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, cjwatson@ubuntu.com, linux-mm@kvack.org To: "Hugh Dickins" Return-path: Received: from rv-out-0910.google.com ([209.85.198.189]:2198 "EHLO rv-out-0910.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750800AbXJVUkP (ORCPT ); Mon, 22 Oct 2007 16:40:15 -0400 Received: by rv-out-0910.google.com with SMTP id k20so1296439rvb for ; Mon, 22 Oct 2007 13:40:14 -0700 (PDT) In-Reply-To: Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi Hugh, On 10/22/07, Hugh Dickins wrote: > I don't disagree with your unionfs_writepages patch, Pekka, but I think > it should be viewed as an optimization (don't waste time trying to write > a group of pages when we know that nothing will be done) rather than as > essential. Ok, so tmpfs needs your fix still. On 10/22/07, Hugh Dickins wrote: > > So now I wonder if we still need the patch to prevent AOP_WRITEPAGE_ACTIVATE > > from being returned to userland. I guess we still need it, b/c even with > > your patch, generic_writepages() can return AOP_WRITEPAGE_ACTIVATE back to > > the VFS and we need to ensure that doesn't "leak" outside the kernel. > > Can it now? Current git has a patch from Andrew which bears a striking > resemblance to that from Pekka, stopping the leak from write_cache_pages. I don't think it can, it looks ok now. Pekka