On Thu, 25 Aug 2011 13:26:19 -0700 Joe Perches <joe@xxxxxxxxxxx> wrote: > Add __attribute__((format (printf...) to the function > to validate format and arguments. Use vsprintf extension > %pV to avoid any possible message interleaving. Coalesce > format string. Convert printks/pr_warning to pr_warn. > > --- a/include/linux/mm.h > +++ b/include/linux/mm.h > @@ -1334,7 +1334,8 @@ extern void si_meminfo(struct sysinfo * val); > extern void si_meminfo_node(struct sysinfo *val, int nid); > extern int after_bootmem; > > -extern void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); > +extern __attribute__((format (printf, 3, 4))) > +void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); > > extern void setup_per_cpu_pageset(void); > > diff --git a/mm/page_alloc.c b/mm/page_alloc.c looky: --- a/include/linux/mm.h~mm-neaten-warn_alloc_failed-fix +++ a/include/linux/mm.h @@ -1335,7 +1335,7 @@ extern void si_meminfo(struct sysinfo * extern void si_meminfo_node(struct sysinfo *val, int nid); extern int after_bootmem; -extern __attribute__((format (printf, 3, 4))) +extern __printf(3, 4) void warn_alloc_failed(gfp_t gfp_mask, int order, const char *fmt, ...); extern void setup_per_cpu_pageset(void); _ -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>