aboutsummaryrefslogtreecommitdiff
path: root/include/linux/vmalloc.h
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2017-04-19 12:00:54 -0400
committerMoyster <oysterized@gmail.com>2018-05-16 15:01:26 +0200
commit002906ee852e9554172b726fbaa523b8fbd7bcb6 (patch)
treee9bc5994b241e91a6453fb0f055cf403f8aaf698 /include/linux/vmalloc.h
parentf050cef41ea471f42af20d7f48ad22d7c8420b14 (diff)
downloadandroid_kernel_m2note-002906ee852e9554172b726fbaa523b8fbd7bcb6.tar.gz
add vmalloc alloc_size attributes
Diffstat (limited to 'include/linux/vmalloc.h')
-rw-r--r--include/linux/vmalloc.h21
1 files changed, 11 insertions, 10 deletions
diff --git a/include/linux/vmalloc.h b/include/linux/vmalloc.h
index 7d5773a99..aa4d7535f 100644
--- a/include/linux/vmalloc.h
+++ b/include/linux/vmalloc.h
@@ -64,18 +64,19 @@ static inline void vmalloc_init(void)
}
#endif
-extern void *vmalloc(unsigned long size);
-extern void *vzalloc(unsigned long size);
-extern void *vmalloc_user(unsigned long size);
-extern void *vmalloc_node(unsigned long size, int node);
-extern void *vzalloc_node(unsigned long size, int node);
-extern void *vmalloc_exec(unsigned long size);
-extern void *vmalloc_32(unsigned long size);
-extern void *vmalloc_32_user(unsigned long size);
-extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot);
+extern void *vmalloc(unsigned long size) __attribute__((alloc_size(1)));
+extern void *vzalloc(unsigned long size) __attribute__((alloc_size(1)));
+extern void *vmalloc_user(unsigned long size) __attribute__((alloc_size(1)));
+extern void *vmalloc_node(unsigned long size, int node) __attribute__((alloc_size(1)));
+extern void *vzalloc_node(unsigned long size, int node) __attribute__((alloc_size(1)));
+extern void *vmalloc_exec(unsigned long size) __attribute__((alloc_size(1)));
+extern void *vmalloc_32(unsigned long size) __attribute__((alloc_size(1)));
+extern void *vmalloc_32_user(unsigned long size) __attribute__((alloc_size(1)));
+extern void *__vmalloc(unsigned long size, gfp_t gfp_mask, pgprot_t prot) __attribute__((alloc_size(1)));
extern void *__vmalloc_node_range(unsigned long size, unsigned long align,
unsigned long start, unsigned long end, gfp_t gfp_mask,
- pgprot_t prot, int node, const void *caller);
+ pgprot_t prot, int node, const void *caller) __attribute__((alloc_size(1)));
+
extern void vfree(const void *addr);
extern void *vmap(struct page **pages, unsigned int count,