public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* corrupted log causes infinite loop at mount
@ 2006-10-13 19:46 Eric Sandeen
  2006-10-15  5:51 ` David Chatterton
  0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2006-10-13 19:46 UTC (permalink / raw)
  To: xfs

While playing with some filesystem corruption testers, I ran into this.

http://sandeen.net/xfs.31.img.bz2

If you try to mount, it gets into xfs_buf_get_noaddr via log replay with
a len of 0, and I think this causes an infinite loop in the goto:

 try_again:
        data = kmem_alloc(malloc_len, KM_SLEEP | KM_MAYFAIL);
        if (unlikely(data == NULL))
                goto fail_free_buf;

        /* check whether alignment matches.. */
        if ((__psunsigned_t)data !=
            ((__psunsigned_t)data & ~target->bt_smask)) {
                /* .. else double the size and try again */
                kmem_free(data, malloc_len);
                malloc_len <<= 1;
                goto try_again;
        }

Up the callchain a bit there is an ASSERT that the size is > 0, but of
course that doesn't help on a non-debug kernel...

haven't had time to investigate beyond that.

-Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2006-10-18  3:47 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2006-10-18  3:47     ` Eric Sandeen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox