lkml.org 
[lkml]   [2009]   [Aug]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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


\
 
 \ /
  Last update: 2009-10-18 23:28    [W:0.174 / U:0.472 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site