public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Russell King <rmk@arm.linux.org.uk>
To: Jeff Chua <jchua@fedex.com>
Cc: Erik Andersen <andersen@codepoet.org>,
	Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Linux Kernel <linux-kernel@vger.kernel.org>
Subject: Re: [BUG] initrd >24MB corruption (fwd)
Date: Tue, 27 Aug 2002 10:30:47 +0100	[thread overview]
Message-ID: <20020827103047.A13528@flint.arm.linux.org.uk> (raw)
In-Reply-To: <Pine.LNX.4.44.0208271648040.26407-100000@boston.corp.fedex.com>; from jchua@fedex.com on Tue, Aug 27, 2002 at 04:55:00PM +0800

On Tue, Aug 27, 2002 at 04:55:00PM +0800, Jeff Chua wrote:
> On Mon, 26 Aug 2002, Erik Andersen wrote:
> > How much total ram does your system have?
> 
> 640MB.

Its not that problem then. 8)

I was suspecting that the write() to the ramdisk device was hanging
(which you could confirm by printk'ing an 'i' before and an 'o' after
the write call in flush_window() in init/do_mounts.c or
drivers/block/rd.c.  If you end up with 'i' as the last character, its
the write that hangs, if its an 'o' then its gunzip itself.)

The other possibility is this little critter:

static int __init fill_inbuf(void)
{
        if (exit_code) return -1;

        insize = read(crd_infd, inbuf, INBUFSIZ);
        if (insize == 0) return -1;

        inptr = 1;

        return inbuf[0];
}

You could put printks in the paths that return -1 and see if you're
hitting any of those.

However, returning '-1' is asking for trouble.  When I was looking at
how to handle the "out of space" in the ramdisk issue, I found that
there appears to be NO value that fill_inbuf() can return that will
guarantee to terminate inflate.c at an arbitary point in the
decompression.

In gzip, we abort the program on error.  In the kernel, we don't
have that luxury.  (Luckily initramfs uses a cut-down gzip to do
the decompression, which can exit on error.)

-- 
Russell King (rmk@arm.linux.org.uk)                The developer of ARM Linux
             http://www.arm.linux.org.uk/personal/aboutme.html


  reply	other threads:[~2002-08-27  9:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-08-27  2:49 [BUG] initrd >24MB corruption (fwd) Jeff Chua
2002-08-27  2:56 ` Erik Andersen
2002-08-27  8:55   ` Jeff Chua
2002-08-27  9:30     ` Russell King [this message]
2002-08-28  5:37       ` Jeff Chua
2002-08-28  5:59       ` Jeff Chua
2002-08-30  7:12         ` Jeff Chua
2002-09-14  3:02 ` Werner Almesberger
2002-09-14  3:35   ` Jeff Chua

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=20020827103047.A13528@flint.arm.linux.org.uk \
    --to=rmk@arm.linux.org.uk \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andersen@codepoet.org \
    --cc=jchua@fedex.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