X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;ds=sidebyside;f=include%2Flinux%2Fcompiler_types.h;h=74e04ecd4c8941863fe517af779f7298b4196e29;hb=52abb27abfff8c5ddf44eef4d759f3d1e9f166c5;hp=d9d98e8a9a3b74b4eb0570c9c06693cc66871c8c;hpb=55be6084c8e0e0ada9278c2ab60b7a584378efda;p=platform%2Fkernel%2Flinux-rpi.git diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h index d9d98e8..74e04ec 100644 --- a/include/linux/compiler_types.h +++ b/include/linux/compiler_types.h @@ -271,14 +271,16 @@ struct ftrace_likely_data { /* * Any place that could be marked with the "alloc_size" attribute is also - * a place to be marked with the "malloc" attribute. Do this as part of the - * __alloc_size macro to avoid redundant attributes and to avoid missing a - * __malloc marking. + * a place to be marked with the "malloc" attribute, except those that may + * be performing a _reallocation_, as that may alias the existing pointer. + * For these, use __realloc_size(). */ #ifdef __alloc_size__ # define __alloc_size(x, ...) __alloc_size__(x, ## __VA_ARGS__) __malloc +# define __realloc_size(x, ...) __alloc_size__(x, ## __VA_ARGS__) #else # define __alloc_size(x, ...) __malloc +# define __realloc_size(x, ...) #endif #ifndef asm_volatile_goto