The patch titled Subject: mm: fix race between kmem_cache destroy, create and deactivate has been removed from the -mm tree. Its filename was mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v4.patch This patch was dropped because it was folded into mm-fix-race-between-kmem_cache-destroy-create-and-deactivate.patch ------------------------------------------------------ From: Shakeel Butt <shakeelb@xxxxxxxxxx> Subject: mm: fix race between kmem_cache destroy, create and deactivate handle the RCU callbacks for SLUB deactivation Link: http://lkml.kernel.org/r/20180611192951.195727-1-shakeelb@xxxxxxxxxx Signed-off-by: Shakeel Butt <shakeelb@xxxxxxxxxx> Cc: Michal Hocko <mhocko@xxxxxxxxxx> Cc: Greg Thelen <gthelen@xxxxxxxxxx> Cc: Christoph Lameter <cl@xxxxxxxxx> Cc: Pekka Enberg <penberg@xxxxxxxxxx> Cc: David Rientjes <rientjes@xxxxxxxxxx> Cc: Joonsoo Kim <iamjoonsoo.kim@xxxxxxx> Cc: Johannes Weiner <hannes@xxxxxxxxxxx> Cc: Vladimir Davydov <vdavydov.dev@xxxxxxxxx> Cc: Tejun Heo <tj@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/slab_common.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff -puN mm/slab_common.c~mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v4 mm/slab_common.c --- a/mm/slab_common.c~mm-fix-race-between-kmem_cache-destroy-create-and-deactivate-v4 +++ a/mm/slab_common.c @@ -834,6 +834,18 @@ static void flush_memcg_workqueue(struct s->memcg_params.dying = true; mutex_unlock(&slab_mutex); + /* + * SLUB deactivates the kmem_caches through call_rcu_sched. Make + * sure all registered rcu callbacks have been invoked. + */ + if (IS_ENABLED(CONFIG_SLUB)) + rcu_barrier_sched(); + + /* + * SLAB and SLUB create memcg kmem_caches through workqueue and SLUB + * deactivates the memcg kmem_caches through workqueue. Make sure all + * previous workitems on workqueue are processed. + */ flush_workqueue(memcg_kmem_cache_wq); } #else _ Patches currently in -mm which might be from shakeelb@xxxxxxxxxx are mm-fix-race-between-kmem_cache-destroy-create-and-deactivate.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html