diff options
Diffstat (limited to 'mm/slub.c')
-rw-r--r-- | mm/slub.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/mm/slub.c b/mm/slub.c index c33b0e13cca7..8f5dcb0ac24f 100644 --- a/mm/slub.c +++ b/mm/slub.c @@ -4522,7 +4522,17 @@ static ssize_t show_slab_objects(struct kmem_cache *s, } } - get_online_mems(); + /* + * It is impossible to take "mem_hotplug_lock" here with "kernfs_mutex" + * already held which will conflict with an existing lock order: + * + * mem_hotplug_lock->slab_mutex->kernfs_mutex + * + * We don't really need mem_hotplug_lock (to hold off + * slab_mem_going_offline_callback) here because slab's memory hot + * unplug code doesn't destroy the kmem_cache->node[] data. + */ + #ifdef CONFIG_SLUB_DEBUG if (flags & SO_ALL) { struct kmem_cache_node *n; @@ -4563,7 +4573,6 @@ static ssize_t show_slab_objects(struct kmem_cache *s, x += sprintf(buf + x, " N%d=%lu", node, nodes[node]); #endif - put_online_mems(); kfree(nodes); return x + sprintf(buf + x, "\n"); } |