mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
To: Eric Sesterhenn <snakebyte@gmx.de>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [Patch] BUG in fs/jfs/jfs_xtree.c
Date: Mon, 18 Dec 2006 14:46:36 -0600	[thread overview]
Message-ID: <1166474796.28381.3.camel@kleikamp.austin.ibm.com> (raw)
In-Reply-To: <1166467889.32321.4.camel@alice>

On Mon, 2006-12-18 at 19:51 +0100, Eric Sesterhenn wrote:
> hi,
> 
> while playing around with fsfuzzer, i got the following oops with jfs:
> 
> [  851.804875] BUG at fs/jfs/jfs_xtree.c:760 assert(!BT_STACK_FULL(btstack))

... 

> On a damaged filesystem we might have a full stack and should
> not progress further, and return instead of calling BUG()
> 
> Signed-off-by: Eric Sesterhenn
> 
> --- linux-2.6.19/fs/jfs/jfs_xtree.c.orig	2006-12-18 14:37:07.000000000 +0100
> +++ linux-2.6.19/fs/jfs/jfs_xtree.c	2006-12-18 14:37:55.000000000 +0100
> @@ -757,6 +757,8 @@ static int xtSearch(struct inode *ip, s6
>  			nsplit = 0;
>  
>  		/* push (bn, index) of the parent page/entry */
> +		if (BT_STACK_FULL(btstack))
> +			return -EINVAL;
>  		BT_PUSH(btstack, bn, index);
>  
>  		/* get the child page block number */
> 

I typically return -EIO for metadata-corruption problems.  I also want
to look at the other places in jfs_xtree.c that call BT_PUSH.  I'm on
vacation today, so I'll take a closer look at this tomorrow and push it
upstream.

Thanks!
Shaggy
-- 
David Kleikamp
IBM Linux Technology Center


  reply	other threads:[~2006-12-18 20:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-12-18 18:51 Eric Sesterhenn
2006-12-18 20:46 ` Dave Kleikamp [this message]
2006-12-19 16:14 ` Dave Kleikamp

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=1166474796.28381.3.camel@kleikamp.austin.ibm.com \
    --to=shaggy@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=snakebyte@gmx.de \
    /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

all inboxes | Powered by JetHome®