From: Linus Torvalds <torvalds@linux-foundation.org>
To: Anirban Sinha <ASinha@zeugmasystems.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] console_print: change the function api to make it have printk style interface
Date: Tue, 25 Aug 2009 17:18:28 -0700 (PDT) [thread overview]
Message-ID: <alpine.LFD.2.01.0908251717230.3218@localhost.localdomain> (raw)
In-Reply-To: <DDFD17CC94A9BD49A82147DDF7D545C501EA9241@exchange.ZeugmaSystems.local>
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
next prev parent reply other threads:[~2009-08-26 0:19 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-25 23:47 Anirban Sinha
2009-08-26 0:18 ` Linus Torvalds [this message]
2009-08-26 0:28 ` Anirban Sinha
2009-08-26 0:39 ` Linus Torvalds
2009-08-26 0:57 ` Anirban Sinha
2009-08-26 0:26 ` Randy Dunlap
2009-08-26 20:05 ` Anirban Sinha
2009-08-27 19:34 ` Linus Torvalds
2009-08-27 21:36 ` Anirban Sinha
2009-09-11 19:29 ` [PATCH] cleanup legacy console_print function Anirban Sinha
2009-09-14 14:50 ` Linus Torvalds
2009-09-14 17:18 ` Anirban Sinha
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LFD.2.01.0908251717230.3218@localhost.localdomain \
--to=torvalds@linux-foundation.org \
--cc=ASinha@zeugmasystems.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®