[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <alpine.LFD.2.01.0908251717230.3218@localhost.localdomain>
Date: Tue, 25 Aug 2009 17:18:28 -0700 (PDT)
From: Linus Torvalds <torvalds@...ux-foundation.org>
To: Anirban Sinha <ASinha@...gmasystems.com>
cc: linux-kernel@...r.kernel.org
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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists