aboutsummaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorDaniel Micay <danielmicay@gmail.com>2017-04-19 12:00:54 -0400
committerMoyster <oysterized@gmail.com>2018-05-16 13:25:43 +0200
commitc8972edb1a80b6395f9df64f6ea856cd09e334e3 (patch)
tree87b65e14f39189ad765b0f6308c7f5af9cf0f128 /include/linux
parent722b80cdfb984ccb4bfdb4f07aad6ff33b61ae7d (diff)
add vmalloc alloc_size attributes
Diffstat (limited to 'include/linux')
-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,