[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20131202182606.GA11204@thunk.org>
Date: Mon, 2 Dec 2013 13:26:06 -0500
From: Theodore Ts'o <tytso@....edu>
To: Kit Westneat <kwestneat@....com>
Cc: "Dilger, Andreas" <andreas.dilger@...el.com>,
"linux-ext4@...r.kernel.org" <linux-ext4@...r.kernel.org>
Subject: Re: [PATCH] e2image: double free when restoring image
On Mon, Dec 02, 2013 at 12:27:03PM -0500, Kit Westneat wrote:
> diff --git a/lib/ext2fs/openfs.c b/lib/ext2fs/openfs.c
> index 113b80e..6861cfe 100644
> --- a/lib/ext2fs/openfs.c
> +++ b/lib/ext2fs/openfs.c
> @@ -441,6 +441,7 @@ errcode_t ext2fs_rewrite_to_io(ext2_filsys fs,
> io_channel new_io)
> {
> if ((fs->flags & EXT2_FLAG_IMAGE_FILE) == 0)
> return EXT2_ET_NOT_IMAGE_FILE;
> + new_io->block_size = fs->io->block_size;
One other thought; we should really use io_channel_set_blksize(),
which is the supported interface to set the blocksize. This makes
sure that if there is any cached blocks, they are flushed, and there
might also some other io_channels, either now in the future (i.e., to
talk to Windows, etc.) where some kind of ioctl or other io control
functoin might be needed to set the block size.
I'll send out a corrected patch.
Thanks again, for looking into this!
- 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