Messages in this thread | | | Date | Tue, 25 Aug 2009 17:18:28 -0700 (PDT) | From | Linus Torvalds <> | Subject | Re: [PATCH] console_print: change the function api to make it have printk style interface |
| |
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.
Linus
| |