All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Sandeen <sandeen@sandeen.net>
To: chatz@melbourne.sgi.com
Cc: xfs@oss.sgi.com
Subject: Re: corrupted log causes infinite loop at mount
Date: Sun, 15 Oct 2006 09:02:39 -0500	[thread overview]
Message-ID: <45323F7F.80807@sandeen.net> (raw)
In-Reply-To: <4531CC5D.5010705@melbourne.sgi.com>

David Chatterton wrote:
> I assume the loop is further up the chain since kmem_alloc should return NULL
> when asked to alloc 0. So then the problem also lies further up the chain in
> checking for a 0 length before calling down, and/or not assuming we are out of
> memory when xfs_buf_get_noaddr fails.

Well, I set kdb breakpoints, and we only entered xfs_buf_get_noaddr once, so I 
assume it's looping inside.  But I was looking for bugs on, um, another 
filesystem at the time, so didn't investigate much.

I can put it on my list of spare-time bugs to look at, or just thought you guys 
may be interested as well.

-Eric

p.s. ok can't help but look just a bit further...

a test module which does:

int __init test_init(void)
{
         void *data;
         int size = 0;

         data = kmalloc(size, GFP_KERNEL);
         if (data == NULL) {
                 printk("got NULL for alloc return\n");
                 return -1;
         } else {
                 printk("allocated %d bytes at %p\n", size, data);
                 return 0;
         }

}

yields:

allocated 0 bytes at ffff810029d88480

not NULL... nifty eh!

-Eric

  reply	other threads:[~2006-10-15 14:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-13 19:46 corrupted log causes infinite loop at mount Eric Sandeen
2006-10-15  5:51 ` David Chatterton
2006-10-15 14:02   ` Eric Sandeen [this message]
2006-10-18  3:47     ` Eric Sandeen

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=45323F7F.80807@sandeen.net \
    --to=sandeen@sandeen.net \
    --cc=chatz@melbourne.sgi.com \
    --cc=xfs@oss.sgi.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.