xfs
[Top] [All Lists]

Re: corrupted log causes infinite loop at mount

To: chatz@xxxxxxxxxxxxxxxxx
Subject: Re: corrupted log causes infinite loop at mount
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Sun, 15 Oct 2006 09:02:39 -0500
Cc: xfs@xxxxxxxxxxx
In-reply-to: <4531CC5D.5010705@xxxxxxxxxxxxxxxxx>
References: <452FECFE.5050902@xxxxxxxxxxx> <4531CC5D.5010705@xxxxxxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Thunderbird 1.5.0.7 (Macintosh/20060909)
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


<Prev in Thread] Current Thread [Next in Thread>