Merge tag 'block-5.15-2021-09-05' of git://git.kernel.dk/linux-block
[linux-2.6-microblaze.git] / kernel / pid_namespace.c
index ca43239..a46a372 100644 (file)
@@ -51,7 +51,8 @@ static struct kmem_cache *create_pid_cachep(unsigned int level)
        mutex_lock(&pid_caches_mutex);
        /* Name collision forces to do allocation under mutex. */
        if (!*pkc)
-               *pkc = kmem_cache_create(name, len, 0, SLAB_HWCACHE_ALIGN, 0);
+               *pkc = kmem_cache_create(name, len, 0,
+                                        SLAB_HWCACHE_ALIGN | SLAB_ACCOUNT, 0);
        mutex_unlock(&pid_caches_mutex);
        /* current can fail, but someone else can succeed. */
        return READ_ONCE(*pkc);
@@ -449,7 +450,7 @@ const struct proc_ns_operations pidns_for_children_operations = {
 
 static __init int pid_namespaces_init(void)
 {
-       pid_ns_cachep = KMEM_CACHE(pid_namespace, SLAB_PANIC);
+       pid_ns_cachep = KMEM_CACHE(pid_namespace, SLAB_PANIC | SLAB_ACCOUNT);
 
 #ifdef CONFIG_CHECKPOINT_RESTORE
        register_sysctl_paths(kern_path, pid_ns_ctl_table);