public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Dave Jones <davej@redhat.com>
Cc: lkml@rtr.ca, linux-kernel@vger.kernel.org, torvalds@osdl.org
Subject: Re: [PATCH] Fix bytecount result from printk()
Date: Thu, 1 Dec 2005 18:04:59 -0800	[thread overview]
Message-ID: <20051201180459.2afa2b1d.akpm@osdl.org> (raw)
In-Reply-To: <20051201175732.GD19433@redhat.com>

Dave Jones <davej@redhat.com> wrote:
>
> On Thu, Dec 01, 2005 at 10:55:49AM -0500, Mark Lord wrote:
>  > printk() returns a bytecount, which nothing actually appears to use.
> 
> We do check it in a few places.
> 
> arch/x86_64/kernel/traps.c:                             i += printk(" "); \
> arch/x86_64/kernel/traps.c:                     i += printk(" <%s> ", id);
> arch/x86_64/kernel/traps.c:                     i += printk(" <EOE> ");
> arch/x86_64/kernel/traps.c:                             i += printk(" <IRQ> ");
> arch/x86_64/kernel/traps.c:                             i += printk(" <EOI> ");
> drivers/char/mem.c:             ret = printk("%s", tmp);
> 

And if you don't fix kmsg_write(), this patch will actually break /dev/kmsg
- userspace complains about the write() return value.

Please review these patches, queued since 2.6.15-rc1-mm1:

ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15-rc3/2.6.15-rc3-mm1/broken-out/printk-return-value-fix-it.patch
ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.15-rc3/2.6.15-rc3-mm1/broken-out/kmsg_write-dont-return-printk-return-value.patch

  parent reply	other threads:[~2005-12-02  2:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-01 15:55 [PATCH] Fix bytecount result from printk() Mark Lord
2005-12-01 16:09 ` Linus Torvalds
2005-12-01 16:25   ` Mark Lord
2005-12-01 17:57 ` Dave Jones
2005-12-01 20:15   ` David S. Miller
2005-12-02  1:23     ` Andi Kleen
2005-12-01 21:09       ` Mark Lord
2005-12-01 21:16         ` Andi Kleen
2005-12-02  2:04   ` Andrew Morton [this message]
2005-12-02  2:22     ` Mark Lord
2005-12-01 20:14 ` David S. Miller

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=20051201180459.2afa2b1d.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=davej@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkml@rtr.ca \
    --cc=torvalds@osdl.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