From patchwork Wed Apr 29 21:09:48 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 26650 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 35492B7043 for ; Thu, 30 Apr 2009 07:11:31 +1000 (EST) Received: by ozlabs.org (Postfix) id 25EC4DDE22; Thu, 30 Apr 2009 07:11:31 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id C0A73DDE20 for ; Thu, 30 Apr 2009 07:11:30 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756747AbZD2VLL (ORCPT ); Wed, 29 Apr 2009 17:11:11 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1755282AbZD2VLK (ORCPT ); Wed, 29 Apr 2009 17:11:10 -0400 Received: from extu-mxob-1.symantec.com ([216.10.194.28]:54990 "EHLO extu-mxob-1.symantec.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753637AbZD2VLJ (ORCPT ); Wed, 29 Apr 2009 17:11:09 -0400 Received: from tus1opsmtapin01.ges.symantec.com (tus1opsmtapin01.ges.symantec.com [192.168.214.43]) by extu-mxob-1.symantec.com (8.14.1/8.14.1) with ESMTP id n3TL9pYQ016489 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 29 Apr 2009 14:09:51 -0700 Received: from oni.engba.symantec.com ([10.182.128.240] helo=megami.veritas.com) by tus1opsmtapin01.ges.symantec.com with smtp (Exim 4.67) (envelope-from ) id 1LzH2M-0006Dr-U6; Wed, 29 Apr 2009 14:09:50 -0700 Received: from [172.20.23.235]([172.20.23.235]) (2029 bytes) by megami.veritas.com via sendmail with P:esmtp/R:smart_host/T:smtp (sender: ) id for ; Wed, 29 Apr 2009 14:09:49 -0700 (PDT) (Smail-3.2.0.101 1997-Dec-17 #15 built 2001-Aug-30) Date: Wed, 29 Apr 2009 22:09:48 +0100 (BST) From: Hugh Dickins X-X-Sender: hugh@blonde.anvils To: Andrew Morton cc: Mel Gorman , Andi Kleen , David Miller , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: [PATCH mmotm] mm: alloc_large_system_hash check order Message-ID: MIME-Version: 1.0 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On an x86_64 with 4GB ram, tcp_init()'s call to alloc_large_system_hash(), to allocate tcp_hashinfo.ehash, is now triggering an mmotm WARN_ON_ONCE on order >= MAX_ORDER - it's hoping for order 11. alloc_large_system_hash() had better make its own check on the order. Signed-off-by: Hugh Dickins --- Should probably follow page-allocator-do-not-sanity-check-order-in-the-fast-path-fix.patch Cc'ed DaveM and netdev, just in case they're surprised it was asking for so much, or disappointed it's not getting as much as it was asking for. mm/page_alloc.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html --- 2.6.30-rc3-mm1/mm/page_alloc.c 2009-04-29 21:01:08.000000000 +0100 +++ mmotm/mm/page_alloc.c 2009-04-29 21:12:04.000000000 +0100 @@ -4765,7 +4765,10 @@ void *__init alloc_large_system_hash(con table = __vmalloc(size, GFP_ATOMIC, PAGE_KERNEL); else { unsigned long order = get_order(size); - table = (void*) __get_free_pages(GFP_ATOMIC, order); + + if (order < MAX_ORDER) + table = (void *)__get_free_pages(GFP_ATOMIC, + order); /* * If bucketsize is not a power-of-two, we may free * some pages at the end of hash table.