diff --git a/mm/slab.c b/mm/slab.c index 018d32496e8d1360a2ad9928a29679aa5a0714ac..46f21e73db2f8f1eec907b38f1d69065e375e70a 100644 --- a/mm/slab.c +++ b/mm/slab.c @@ -4326,8 +4326,12 @@ static int leaks_show(struct seq_file *m, void *p) * whole processing. */ do { - set_store_user_clean(cachep); drain_cpu_caches(cachep); + /* + * drain_cpu_caches() could make kmemleak_object and + * debug_objects_cache dirty, so reset afterwards. + */ + set_store_user_clean(cachep); x[1] = 0;