From patchwork Wed Jun 1 15:41:54 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cyril Hrubis X-Patchwork-Id: 840662 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p51Fj4RH000377 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 1 Jun 2011 15:45:25 GMT Received: from canuck.infradead.org ([134.117.69.58]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QRnYY-0006sc-Bm; Wed, 01 Jun 2011 15:42:02 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRnYX-0005yA-SI; Wed, 01 Jun 2011 15:42:01 +0000 Received: from ksp.mff.cuni.cz ([195.113.26.206] helo=atrey.karlin.mff.cuni.cz) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1QRnYT-0005xq-18 for linux-arm-kernel@lists.infradead.org; Wed, 01 Jun 2011 15:41:58 +0000 Received: by atrey.karlin.mff.cuni.cz (Postfix, from userid 16977) id D2E83F043F; Wed, 1 Jun 2011 17:41:54 +0200 (CEST) Date: Wed, 1 Jun 2011 17:41:54 +0200 From: Cyril Hrubis To: pavel@ucw.cz, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, eric.y.miao@gmail.com, utx@penguin.cz, zaurus-devel@www.linuxtogo.org, marek.vasut@gmail.com Subject: zaurus 3.0-rc1 Oops (fail GFP_DMA allocations when ZONE_DMA is not configured) Message-ID: <20110601154154.GB26197@atrey.karlin.mff.cuni.cz> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110601_114157_354506_7B2EE7A7 X-CRM114-Status: GOOD ( 31.64 ) X-Spam-Score: -0.0 (/) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 T_RP_MATCHES_RCVD Envelope sender domain matches handover relay domain X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Wed, 01 Jun 2011 15:45:26 +0000 (UTC) Hi! The 3.0-rc1 no longer boots on spitz see the attached Oops. The bisecting pointed to this commit, reverting it machine boots again. commit a197b59ae6e8bee56fcef37ea2482dc08414e2ac Author: David Rientjes Date: Tue May 24 17:12:35 2011 -0700 mm: fail GFP_DMA allocations when ZONE_DMA is not configured The page allocator will improperly return a page from ZONE_NORMAL even when __GFP_DMA is passed if CONFIG_ZONE_DMA is disabled. The caller expects DMA memory, perhaps for ISA devices with 16-bit address registers, and may get higher memory resulting in undefined behavior. This patch causes the page allocator to return NULL in such circumstances with a warning emitted to the kernel log on the first occurrence. Signed-off-by: David Rientjes Cc: Mel Gorman Cc: KOSAKI Motohiro Cc: KAMEZAWA Hiroyuki Cc: Rik van Riel Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 01e6b61..10a8c6d 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -2247,6 +2247,10 @@ __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, if (should_fail_alloc_page(gfp_mask, order)) return NULL; +#ifndef CONFIG_ZONE_DMA + if (WARN_ON_ONCE(gfp_mask & __GFP_DMA)) + return NULL; +#endif /* * Check the zones suitable for the gfp_mask contain at least one