Re: [PATCH] console_print: change the function api to make it haveprintk style interface

From: Linus Torvalds
Date: Tue Aug 25 2009 - 20:19:15 EST

On Tue, 25 Aug 2009, Anirban Sinha wrote:
> -void console_print(const char *s)
> +int console_print(const char *fmt, ...)
> {
> - printk(KERN_EMERG "%s", s);
> + va_list args;
> + int r;
> + char _fmt[1024] = KERN_EMERG;

Don't do this. That's a 1kB stack frame right there. You'll overflow the
stack very quickly.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at
Please read the FAQ at