From patchwork Mon Jun 13 02:03:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hugh Dickins X-Patchwork-Id: 100124 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from ozlabs.org (localhost [IPv6:::1]) by ozlabs.org (Postfix) with ESMTP id A086AB70F5 for ; Mon, 13 Jun 2011 12:03:33 +1000 (EST) Received: from smtp-out.google.com (smtp-out.google.com [74.125.121.67]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 927ECB6FFF for ; Mon, 13 Jun 2011 12:03:18 +1000 (EST) Received: from hpaq13.eem.corp.google.com (hpaq13.eem.corp.google.com [172.25.149.13]) by smtp-out.google.com with ESMTP id p5D23CcJ026643 for ; Sun, 12 Jun 2011 19:03:12 -0700 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=google.com; s=beta; t=1307930592; bh=ypU+ccHfNynFOhUTuw1NduBu4WU=; h=Date:From:To:cc:Subject:Message-ID:MIME-Version:Content-Type; b=SKBM3Bh+0uVe+cgzQLEm9/aJFIzMuGovWF1JzGjxELJsGKOrYHacjKs2TeoF314Se Or/BY4cxcGEQuqxx1hxwg== Received: from pva4 (pva4.prod.google.com [10.241.209.4]) by hpaq13.eem.corp.google.com with ESMTP id p5D22wUO030576 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 12 Jun 2011 19:03:11 -0700 Received: by pva4 with SMTP id 4so2098762pva.30 for ; Sun, 12 Jun 2011 19:03:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=beta; h=domainkey-signature:date:from:x-x-sender:to:cc:subject:message-id :user-agent:mime-version:content-type; bh=bdwig3yEB1kQyhuIpOG9IJsnyrEiwNGUMhVbqc7eMqA=; b=d38ysJ9EG9xq4Ncs8O/fW51PvmC4SLowqUTUslrB3/XP04QNC218/aFDxTKx6/y0Cp xft2cBO4IQusX2I6XoUw== DomainKey-Signature: a=rsa-sha1; c=nofws; d=google.com; s=beta; h=date:from:x-x-sender:to:cc:subject:message-id:user-agent :mime-version:content-type; b=Pob1xvCiycEXs4CDK5I7yZthCwGyE0EZmEMIA+ToOzZhhhXVlN56Bx/oIlvK1Y0PUi 6cPDux2oXOzwmvlx5Vmw== Received: by 10.68.59.227 with SMTP id c3mr1917129pbr.380.1307930590890; Sun, 12 Jun 2011 19:03:10 -0700 (PDT) Received: from [192.168.1.5] (c-67-188-178-35.hsd1.ca.comcast.net [67.188.178.35]) by mx.google.com with ESMTPS id k4sm4221939pbl.27.2011.06.12.19.03.09 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 12 Jun 2011 19:03:10 -0700 (PDT) Date: Sun, 12 Jun 2011 19:03:02 -0700 (PDT) From: Hugh Dickins X-X-Sender: hugh@sister.anvils To: Christoph Lameter Subject: [PATCH] slub: fix kernel BUG at mm/slub.c:1950! Message-ID: User-Agent: Alpine 2.00 (LSU 1167 2008-08-23) MIME-Version: 1.0 X-System-Of-Record: true Cc: linux-mm@kvack.org, Pekka Enberg , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org 3.0-rc won't boot with SLUB on my PowerPC G5: kernel BUG at mm/slub.c:1950! Bisected to 1759415e630e "slub: Remove CONFIG_CMPXCHG_LOCAL ifdeffery". After giving myself a medal for finding the BUG on line 1950 of mm/slub.c (it's actually the VM_BUG_ON((unsigned long)(&pcp1) % (2 * sizeof(pcp1))); on line 268 of the morass that is include/linux/percpu.h) I tried the following alignment patch and found it to work. Signed-off-by: Hugh Dickins --- include/linux/slub_def.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- 3.0-rc2/include/linux/slub_def.h 2011-05-29 18:42:37.077880848 -0700 +++ linux/include/linux/slub_def.h 2011-06-12 17:17:51.000000000 -0700 @@ -43,7 +43,7 @@ struct kmem_cache_cpu { #ifdef CONFIG_SLUB_STATS unsigned stat[NR_SLUB_STAT_ITEMS]; #endif -}; +} __attribute__((aligned(2 * sizeof(long)))); struct kmem_cache_node { spinlock_t list_lock; /* Protect partial list and nr_partial */