]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - mm/slab_common.c
mm/mempolicy.c: forbid static or relative flags for local NUMA mode
[mirror_ubuntu-artful-kernel.git] / mm / slab_common.c
index 5d2f24fbafc5535997f282e6751476afdf28f83e..ae323841adb1ac76052eb6536aa2a3acc36b88e3 100644 (file)
@@ -404,6 +404,12 @@ kmem_cache_create(const char *name, size_t size, size_t align,
                goto out_unlock;
        }
 
+       /* Refuse requests with allocator specific flags */
+       if (flags & ~SLAB_FLAGS_PERMITTED) {
+               err = -EINVAL;
+               goto out_unlock;
+       }
+
        /*
         * Some allocators will constraint the set of valid flags to a subset
         * of all flags. We expect them to define CACHE_CREATE_MASK in this