Re: [PATCH] Fix bytecount result from printk()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dave Jones <[email protected]> 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
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux