[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140314133047.GH8282@thunk.org>
Date: Fri, 14 Mar 2014 09:30:47 -0400
From: Theodore Ts'o <tytso@....edu>
To: "Darrick J. Wong" <darrick.wong@...cle.com>
Cc: linux-ext4@...r.kernel.org
Subject: Re: [PATCH 13/49] libext2fs: repair side effects when iterating
dirents in inline dirs
On Mon, Mar 10, 2014 at 11:55:21PM -0700, Darrick J. Wong wrote:
> In ext2fs_inline_data_dir_iterate(), we must be very careful to undo
> any modifications we make to the dir_context pointer passed in by the
> caller, because it's entirely possible that the caller will still want
> to do something with the ctx or something inside.
>
> Specifically, ext2fs_dblist_dir_iterate() wants to be able to free
> ctx->buf, and it reuses the ctx for multiple dblist entries. That
> means that assigning ctx->buf will cause weird crashes at the end of
> dir_iterate().
>
> Since we're being careful with ctx, we might as well handle adding the
> INLINE_DATA flag to ctx->flags for ext2fs_process_dir_block, since the
> dblist caller forgets to unset the flag before reusing the ctx.
>
> This fixes some crashes and valgrind complaints in resize2fs, and is
> necessary for the next patch, which fixes resize2fs not to corrupt
> inline_data filesystems.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@...cle.com>
Thanks, applied.
- Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists