* [PATCH] mke2fs: Avoid segmentation fault in ext2fs_alloc_generic_bmap.
@ 2011-05-09 15:33 Tao Ma
2011-05-09 15:45 ` Lukas Czerner
0 siblings, 1 reply; 3+ messages in thread
From: Tao Ma @ 2011-05-09 15:33 UTC (permalink / raw)
To: linux-ext4
From: Tao Ma <boyu.mt@taobao.com>
In case of error, ext2fs_alloc_generic_bmap free the memory
in the wrong order. So change it to free description first
and then the bitmap.
Signed-off-by: Tao Ma <boyu.mt@taobao.com>
---
lib/ext2fs/gen_bitmap64.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
index df095ac..8b9e4c5 100644
--- a/lib/ext2fs/gen_bitmap64.c
+++ b/lib/ext2fs/gen_bitmap64.c
@@ -129,8 +129,8 @@ errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
retval = bitmap->bitmap_ops->new_bmap(fs, bitmap);
if (retval) {
- ext2fs_free_mem(&bitmap);
ext2fs_free_mem(&bitmap->description);
+ ext2fs_free_mem(&bitmap);
return retval;
}
--
1.6.3.GIT
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] mke2fs: Avoid segmentation fault in ext2fs_alloc_generic_bmap.
2011-05-09 15:33 [PATCH] mke2fs: Avoid segmentation fault in ext2fs_alloc_generic_bmap Tao Ma
@ 2011-05-09 15:45 ` Lukas Czerner
2011-05-09 16:09 ` Ted Ts'o
0 siblings, 1 reply; 3+ messages in thread
From: Lukas Czerner @ 2011-05-09 15:45 UTC (permalink / raw)
To: Tao Ma; +Cc: linux-ext4
On Mon, 9 May 2011, Tao Ma wrote:
> From: Tao Ma <boyu.mt@taobao.com>
>
> In case of error, ext2fs_alloc_generic_bmap free the memory
> in the wrong order. So change it to free description first
> and then the bitmap.
>
> Signed-off-by: Tao Ma <boyu.mt@taobao.com>
> ---
> lib/ext2fs/gen_bitmap64.c | 2 +-
> 1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/lib/ext2fs/gen_bitmap64.c b/lib/ext2fs/gen_bitmap64.c
> index df095ac..8b9e4c5 100644
> --- a/lib/ext2fs/gen_bitmap64.c
> +++ b/lib/ext2fs/gen_bitmap64.c
> @@ -129,8 +129,8 @@ errcode_t ext2fs_alloc_generic_bmap(ext2_filsys fs, errcode_t magic,
>
> retval = bitmap->bitmap_ops->new_bmap(fs, bitmap);
> if (retval) {
> - ext2fs_free_mem(&bitmap);
> ext2fs_free_mem(&bitmap->description);
> + ext2fs_free_mem(&bitmap);
> return retval;
> }
I have actually sent the same patch a while ago:
http://www.spinics.net/lists/linux-ext4/msg23763.html
but Ted have not picked up this yet.
-Lukas
>
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] mke2fs: Avoid segmentation fault in ext2fs_alloc_generic_bmap.
2011-05-09 15:45 ` Lukas Czerner
@ 2011-05-09 16:09 ` Ted Ts'o
0 siblings, 0 replies; 3+ messages in thread
From: Ted Ts'o @ 2011-05-09 16:09 UTC (permalink / raw)
To: Lukas Czerner; +Cc: Tao Ma, linux-ext4
On Mon, May 09, 2011 at 05:45:28PM +0200, Lukas Czerner wrote:
>
> I have actually sent the same patch a while ago:
>
> http://www.spinics.net/lists/linux-ext4/msg23763.html
>
> but Ted have not picked up this yet.
I picked it up just the other day, and it's in the "next" branch of
e2fsprogs.
I thought I had sent an e-mail ack, but I may have forgotten to do so
with this patch; my apologies if that was the case!
- Ted
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-05-09 16:09 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-09 15:33 [PATCH] mke2fs: Avoid segmentation fault in ext2fs_alloc_generic_bmap Tao Ma
2011-05-09 15:45 ` Lukas Czerner
2011-05-09 16:09 ` Ted Ts'o
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).