OSDN Git Service

Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[uclinux-h8/linux.git] / include / linux / slab.h
index e4b5687..508bd82 100644 (file)
 # define SLAB_ACCOUNT          0x00000000UL
 #endif
 
+#ifdef CONFIG_KASAN
+#define SLAB_KASAN             0x08000000UL
+#else
+#define SLAB_KASAN             0x00000000UL
+#endif
+
 /* The following flags affect the page allocator grouping pages by mobility */
 #define SLAB_RECLAIM_ACCOUNT   0x00020000UL            /* Objects are reclaimable */
 #define SLAB_TEMPORARY         SLAB_RECLAIM_ACCOUNT    /* Objects are short-lived */
@@ -370,7 +376,7 @@ static __always_inline void *kmem_cache_alloc_trace(struct kmem_cache *s,
 {
        void *ret = kmem_cache_alloc(s, flags);
 
-       kasan_kmalloc(s, ret, size);
+       kasan_kmalloc(s, ret, size, flags);
        return ret;
 }
 
@@ -381,7 +387,7 @@ kmem_cache_alloc_node_trace(struct kmem_cache *s,
 {
        void *ret = kmem_cache_alloc_node(s, gfpflags, node);
 
-       kasan_kmalloc(s, ret, size);
+       kasan_kmalloc(s, ret, size, gfpflags);
        return ret;
 }
 #endif /* CONFIG_TRACING */