Re: [PATCH] slub/memcg: Cure the brainless abuse of sysfs attributes

From: Steven Rostedt
Date: Sat May 20 2017 - 10:26:09 EST


On Sat, 20 May 2017 06:16:45 -0700
Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:

> On Sat, May 20, 2017 at 12:52:03PM +0200, Thomas Gleixner wrote:
> > This should be rewritten proper by adding a propagate() callback to those
> > slub_attributes which must be propagated and avoid that insane conversion
> > to and from ASCII
>
> Exactly..
>
> >, but that's too large for a hot fix.
>
> What made this such a hot fix? Looks like this crap has been in
> for quite a while.

It can cause a deadlock with get_online_cpus() that has been uncovered
by recent cpu hotplug and lockdep changes that Thomas and Peter have
been doing.

[ 102.567308] Possible unsafe locking scenario:
[ 102.567308]
[ 102.574846] CPU0 CPU1
[ 102.580148] ---- ----
[ 102.585421] lock(cpu_hotplug.lock);
[ 102.589808] lock(slab_mutex);
[ 102.596166] lock(cpu_hotplug.lock);
[ 102.603028] lock(slab_mutex);
[ 102.606846]
[ 102.606846] *** DEADLOCK ***

-- Steve