lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.DEB.2.00.1101110021470.21910@chino.kir.corp.google.com>
Date:	Tue, 11 Jan 2011 00:24:12 -0800 (PST)
From:	David Rientjes <rientjes@...gle.com>
To:	Pekka Enberg <penberg@...nel.org>,
	Andrew Morton <akpm@...ux-foundation.org>
cc:	Christoph Lameter <cl@...ux.com>,
	Bart Van Assche <bvanassche@....org>,
	KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] slub: Fix sysfs circular locking dependency

On Tue, 11 Jan 2011, Pekka Enberg wrote:

> > > New patch that just covers the slub changes.
> > > 
> > > 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.
> > > 
> > > online_pages() currently does not acquire the memory_hotplug
> > > lock. Another patch will be submitted by the memory hotplug
> > > authors to take the memory hotplug lock and describe the
> > > uses of the memory hotplug lock to protect against
> > > adding and removal of nodes from non hotplug data structures.
> > > 
> > > Signed-off-by: Christoph Lameter<cl@...ux.com>
> > Acked-by: David Rientjes<rientjes@...gle.com>
> 
> Is this safe to be applied without the other hotplug parts?
> 

It's safe, but not protecting anything since it can race with memory 
hot-add and cause inconsistent information to be displayed (since we 
iterate over N_NORMAL_MEMORY several times in show_slab_objects() and the 
memory hotplug code modifies it).  I'm hoping Andrew can push Kame's patch 
to add lock_memory_hotplug() to online_pages() either during the merge 
window or during -rc1 (it has good justification -- it can race with 
memory hot-remove) and this can also be pushed during the rc series (to 
fix the lockdep warning).
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ