Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753154AbbHTXii (ORCPT ); Thu, 20 Aug 2015 19:38:38 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:58793 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753061AbbHTXih (ORCPT ); Thu, 20 Aug 2015 19:38:37 -0400 Date: Thu, 20 Aug 2015 16:38:36 -0700 From: Andrew Morton To: "Kirill A. Shutemov" Cc: Hugh Dickins , Andrea Arcangeli , Dave Hansen , Vlastimil Babka , Johannes Weiner , Michal Hocko , David Rientjes , linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCHv3 0/5] Fix compound_head() race Message-Id: <20150820163836.b3b69f2bf36dba7020bdc893@linux-foundation.org> In-Reply-To: <20150820123107.GA31768@node.dhcp.inet.fi> References: <1439976106-137226-1-git-send-email-kirill.shutemov@linux.intel.com> <20150820123107.GA31768@node.dhcp.inet.fi> X-Mailer: Sylpheed 3.4.1 (GTK+ 2.24.23; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1426 Lines: 36 On Thu, 20 Aug 2015 15:31:07 +0300 "Kirill A. Shutemov" wrote: > On Wed, Aug 19, 2015 at 12:21:41PM +0300, Kirill A. Shutemov wrote: > > Here's my attempt on fixing recently discovered race in compound_head(). > > It should make compound_head() reliable in all contexts. > > > > The patchset is against Linus' tree. Let me know if it need to be rebased > > onto different baseline. > > > > It's expected to have conflicts with my page-flags patchset and probably > > should be applied before it. > > > > v3: > > - Fix build without hugetlb; > > - Drop page->first_page; > > - Update comment for free_compound_page(); > > - Use 'unsigned int' for page order; > > > > v2: Per Hugh's suggestion page->compound_head is moved into third double > > word. This way we can avoid memory overhead which v1 had in some > > cases. > > > > This place in struct page is rather overloaded. More testing is > > required to make sure we don't collide with anyone. > > Andrew, can we have the patchset applied, if nobody has objections? I've been hoping to hear from Hugh and I wasn't planning on processing these before the 4.2 release. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/