From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751303Ab1AHI2r (ORCPT ); Sat, 8 Jan 2011 03:28:47 -0500 Received: from freeflow.nu ([178.79.134.28]:59710 "EHLO freeflow.nu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751039Ab1AHI2q (ORCPT ); Sat, 8 Jan 2011 03:28:46 -0500 Subject: Re: [PATCH] slub: Fix sysfs circular locking dependency From: Pekka Enberg To: Bart Van Assche Cc: David Rientjes , Christoph Lameter , KAMEZAWA Hiroyuki , linux-kernel@vger.kernel.org, Andrew Morton In-Reply-To: References: <1294172717-6044-1-git-send-email-penberg@kernel.org> <20110107091106.aaa07abe.kamezawa.hiroyu@jp.fujitsu.com> Content-Type: text/plain; charset="ISO-8859-1" Date: Sat, 08 Jan 2011 10:28:43 +0200 Message-ID: <1294475323.5248.74.camel@jaguar> Mime-Version: 1.0 X-Mailer: Evolution 2.30.3 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 2011-01-08 at 08:42 +0100, Bart Van Assche wrote: > On Fri, Jan 7, 2011 at 9:34 PM, David Rientjes wrote: > > > > On Fri, 7 Jan 2011, Christoph Lameter wrote: > > > > > Subject: slub: Avoid use of slub_lock in show_slab_objects() > > > > > > The purpose of the locking is to prevent removal and additions > > > of nodes when statistics are gathered for a slab cache. So we > > > need to avoid racing with memory hotplug functionality. > > > > > > It is enough to take the memory hotplug locks there instead > > > of the slub_lock. > > > > > > > Because memory hotplug is the only time s->node[] is modified after the > > sysfs files are created, which is the only time show_slab_objects() is > > called. > > > > > online_pages() does not acquire the memory_hotplug lock. So > > > add the missing locking there. > > > > > > Signed-off-by: Christoph Lameter > > > > Acked-by: David Rientjes > > > > [ Should probably be seperated out into two patches, one for the > > memory hotplug locking addition and one for the slub fix, both > > should be pushed during this merge window. If so, a comment > > describing the new semantics of lock_memory_hotplug() to protect > > data structures that may be modified in hotplug notifier > > callbacks would be appreciated. ] > > Shouldn't stable@kernel.org be CC-ed too ? Yup, I'll add it to the patch.