From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pd0-f174.google.com (mail-pd0-f174.google.com [209.85.192.174]) by kanga.kvack.org (Postfix) with ESMTP id 731466B0037 for ; Tue, 4 Feb 2014 19:14:10 -0500 (EST) Received: by mail-pd0-f174.google.com with SMTP id z10so8865995pdj.19 for ; Tue, 04 Feb 2014 16:14:10 -0800 (PST) Received: from mail-pb0-x230.google.com (mail-pb0-x230.google.com [2607:f8b0:400e:c01::230]) by mx.google.com with ESMTPS id va10si26554917pbc.338.2014.02.04.16.14.09 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 04 Feb 2014 16:14:09 -0800 (PST) Received: by mail-pb0-f48.google.com with SMTP id rr13so9189551pbb.35 for ; Tue, 04 Feb 2014 16:14:09 -0800 (PST) Date: Tue, 4 Feb 2014 16:14:07 -0800 (PST) From: David Rientjes Subject: Re: [patch] mm, page_alloc: make first_page visible before PageTail In-Reply-To: <20140204160641.8f5d369eeb2d0318618d6d5f@linux-foundation.org> Message-ID: References: <20140203122052.GC2495@dhcp22.suse.cz> <20140203162036.GJ2495@dhcp22.suse.cz> <52EFC93D.3030106@suse.cz> <20140204160641.8f5d369eeb2d0318618d6d5f@linux-foundation.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-mm@kvack.org List-ID: To: Andrew Morton Cc: Holger Kiehl , Christoph Lameter , Rafael Aquini , Vlastimil Babka , Michal Hocko , Mel Gorman , linux-kernel@vger.kernel.org, linux-mm@kvack.org On Tue, 4 Feb 2014, Andrew Morton wrote: > > Commit bf6bddf1924e ("mm: introduce compaction and migration for ballooned > > pages") introduces page_count(page) into memory compaction which > > dereferences page->first_page if PageTail(page). > > > > Introduce a store memory barrier to ensure page->first_page is properly > > initialized so that code that does page_count(page) on pages off the lru > > always have a valid p->first_page. > > Could we have a code comment please? Even checkpatch knows this rule! > Ok. > > Reported-by: Holger Kiehl > > What did Holger report? > A once-in-five-years NULL pointer dereference on the aforementioned page_count(page). -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org