public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
From: Dave Chinner <david@fromorbit.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: aelder@sgi.com, xfs@oss.sgi.com
Subject: Re: [PATCH] xfs_repair: Check if agno is inside the filesystem
Date: Tue, 28 Jun 2011 21:37:02 +1000	[thread overview]
Message-ID: <20110628113702.GO32466@dastard> (raw)
In-Reply-To: <alpine.LFD.2.00.1106281120250.3864@dhcp-27-109.brq.redhat.com>

On Tue, Jun 28, 2011 at 11:24:46AM +0200, Lukas Czerner wrote:
> On Tue, 28 Jun 2011, Dave Chinner wrote:
> 
> > On Mon, Jun 27, 2011 at 06:53:30PM +0200, Lukas Czerner wrote:
> > > When getting an inode tree pointer from an array inode_tree_ptrs, we
> > > should check if agno, which is used as a pointer to the array, lives
> > > within the file system, because if it is not, we can end up touching
> > > uninitialized memory.
> > 
> > How do you get an agno outside the bounds of the filesystem?
> 
> Hi Dave,
> 
> in my particular case the problem was in
> longform_dir2_entry_check_data(). xfs_dir2_data_entry_t was read and we
> used inode numbed (xfs_dir2_data_entry_t)->inumber to compute AG number.
> However it contained garbage so the resulting agno was too high. In
> modify mode it was not a problem, because the inode was cleared in the
> earlies phase, but in no_modify mode, the was still there.

Ok, a corrupted directory entry is the cause. Might be worthwhile
mentioning that in the commit log.

Cheers,

Dave.
-- 
Dave Chinner
david@fromorbit.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

  reply	other threads:[~2011-06-28 11:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-27 16:53 [PATCH] xfs_repair: Check if agno is inside the filesystem Lukas Czerner
2011-06-28  1:28 ` Dave Chinner
2011-06-28  9:24   ` Lukas Czerner
2011-06-28 11:37     ` Dave Chinner [this message]
  -- strict thread matches above, loose matches on Subject: below --
2011-06-28 10:01 Lukas Czerner
2011-06-28 11:14 ` Lukas Czerner

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=20110628113702.GO32466@dastard \
    --to=david@fromorbit.com \
    --cc=aelder@sgi.com \
    --cc=lczerner@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox