From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: Re: [PATCH] xfs_repair: set args.geo in dir2_kill_block
Date: Tue, 25 Aug 2015 11:55:56 -0500 [thread overview]
Message-ID: <55DC9E1C.8090009@sandeen.net> (raw)
In-Reply-To: <55B14B40.5030209@sandeen.net>
Dave, ping on this?
Thanks,
-Eric
On 7/23/15 3:14 PM, Eric Sandeen wrote:
> This path in xfs_repair:
>
> dir2_kill_block
> libxfs_da_shrink_inode
> xfs_dir2_shrink_inode
> xfs_dir2_db_to_da
>
> segfaults, because dir2_kill_block() does not initialize
> args.geo, and a null geometry winds up in xfs_dir2_db_to_da(),
> which dereferences it.
>
> Fix that.
>
> Signed-off-by: Eric Sandeen <sandeen@redhat.com>
> ---
>
> diff --git a/repair/phase6.c b/repair/phase6.c
> index de445c6..0c952ed 100644
> --- a/repair/phase6.c
> +++ b/repair/phase6.c
> @@ -1438,6 +1438,7 @@ dir2_kill_block(
> args.firstblock = &firstblock;
> args.flist = &flist;
> args.whichfork = XFS_DATA_FORK;
> + args.geo = mp->m_dir_geo;
> if (da_bno >= mp->m_dir_geo->leafblk && da_bno < mp->m_dir_geo->freeblk)
> error = -libxfs_da_shrink_inode(&args, da_bno, bp);
> else
>
> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
prev parent reply other threads:[~2015-08-25 16:56 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-07-23 20:14 [PATCH] xfs_repair: set args.geo in dir2_kill_block Eric Sandeen
2015-07-26 16:24 ` Christoph Hellwig
2015-08-25 16:55 ` Eric Sandeen [this message]
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=55DC9E1C.8090009@sandeen.net \
--to=sandeen@sandeen.net \
--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