login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
October
»
27
Re: [PATCH 1/2] ext3: fix a bug accessing freed memory in ext3_abort
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: Jan Kara
Subject:
Re: [PATCH 1/2] ext3: fix a bug accessing freed memory in ext3_abort
Date: Monday, October 27, 2008 - 1:11 am
> Hi Vegard,
quoted text
> > Vegard Nossum wrote: > > > commit 2d7c820e56ce83b23daee9eb5343730fb309418e > > Author: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com> > > Date: Wed Oct 22 14:15:01 2008 -0700 > > > > ext3: add checks for errors from jbd > > > > introduces a regression which was discovered by kmemcheck: > > Thank you for reporting this regression. It's my fault. > I send patches to fix. > > Regards, > > > Subject: [PATCH 1/2] ext3: fix a bug accessing freed memory in ext3_abort > > Vegard Nossum reported a bug which accesses freed memory. When > journal has been aborted, ext3_put_super() calls ext3_abort() after > freeing the journal_t object, and then ext3_abort() accesses it. > This patch fix it. > > Signed-off-by: Hidehiro Kawai <hidehiro.kawai.ez@hitachi.com>
The patch looks fine. Acked-by: Jan Kara <jack@suse.cz> Honza
quoted text
> --- > fs/ext3/super.c | 10 +++++++--- > 1 file changed, 7 insertions(+), 3 deletions(-) > > Index: linux-2.6.28-rc2/fs/ext3/super.c > =================================================================== > --- linux-2.6.28-rc2.orig/fs/ext3/super.c > +++ linux-2.6.28-rc2/fs/ext3/super.c > @@ -281,7 +281,8 @@ void ext3_abort (struct super_block * sb > EXT3_SB(sb)->s_mount_state |= EXT3_ERROR_FS; > sb->s_flags |= MS_RDONLY; > EXT3_SB(sb)->s_mount_opt |= EXT3_MOUNT_ABORT; > - journal_abort(EXT3_SB(sb)->s_journal, -EIO); > + if (EXT3_SB(sb)->s_journal) > + journal_abort(EXT3_SB(sb)->s_journal, -EIO); > } > > void ext3_warning (struct super_block * sb, const char * function, > @@ -390,11 +391,14 @@ static void ext3_put_super (struct super > { > struct ext3_sb_info *sbi = EXT3_SB(sb); > struct ext3_super_block *es = sbi->s_es; > - int i; > + int i, err; > > ext3_xattr_put_super(sb); > - if (journal_destroy(sbi->s_journal) < 0) > + err = journal_destroy(sbi->s_journal); > + sbi->s_journal = NULL; > + if (err < 0) > ext3_abort(sb, __func__, "Couldn't clean up the journal"); > + > if (!(sb->s_flags & MS_RDONLY)) { > EXT3_CLEAR_INCOMPAT_FEATURE(sb, EXT3_FEATURE_INCOMPAT_RECOVER); > es->s_state = cpu_to_le16(sbi->s_mount_state); >
-- Jan Kara <jack@suse.cz> SuSE CR Labs --
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
Messages in current thread:
v2.6.28-rc1: Regression in ext3/jbd
, Vegard Nossum
, (Sat Oct 25, 4:22 am)
[PATCH 1/2] ext3: fix a bug accessing freed memory in ext3 ...
, Hidehiro Kawai
, (Mon Oct 27, 12:26 am)
[PATCH 1/2] ext3: fix a bug accessing freed memory in ext3 ...
, Hidehiro Kawai
, (Mon Oct 27, 12:31 am)
[PATCH 2/2] ext4: fix a bug accessing freed memory in ext4 ...
, Hidehiro Kawai
, (Mon Oct 27, 12:37 am)
Re: [PATCH 1/2] ext3: fix a bug accessing freed memory in ...
, Jan Kara
, (Mon Oct 27, 1:11 am)
Re: [PATCH 2/2] ext4: fix a bug accessing freed memory in ...
, Jan Kara
, (Mon Oct 27, 1:11 am)
Re: [PATCH 2/2] ext4: fix a bug accessing freed memory in ...
, Ingo Molnar
, (Mon Oct 27, 3:43 am)
[PATCH 1/2 take 2] ext3: fix a bug accessing freed memory ...
, Hidehiro Kawai
, (Mon Oct 27, 4:44 am)
[PATCH 2/2 take 2] ext4: fix a bug accessing freed memory ...
, Hidehiro Kawai
, (Mon Oct 27, 4:50 am)
Re: [PATCH 2/2 take 2] ext4: fix a bug accessing freed mem ...
, Theodore Tso
, (Mon Oct 27, 11:05 am)
Navigation
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
Fortier,Vincent [Montreal]
2.6.21.5 june 30th to july 1st date hang?
Jeff Dike
[ PATCH 2/6 ] UML - Formatting fixes around os_{read_write}_file callers
Liam Girdwood
[PATCH 07/13] regulator: regulator test harness
Oleg Nesterov
Re: Getting the new RxRPC patches upstream
Stefan Seyfried
Re: 2.6.19-rc5: grub is much slower resuming from suspend-to-disk than in 2.6.18
linux-netdev
:
Arnaud Ebalard
Re: [REGRESSION,BISECTED] MIPv6 support broken by f4f914b58019f0
Jan Engelhardt
Re: [PATCH iptables] extension: add xt_cpu match
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Sebastian Andrzej Siewior
[PATCH 8/8] net/emergency: remove locking from reycling pool if emergncy pools are...
David Miller
Re: [PATCH] qlcnic: dont assume NET_IP_ALIGN is 2
git
:
Jakub Narebski
Re: git on MacOSX and files with decomposed utf-8 file names
Brandon Casey
Re: Thunderbird and patches (was Re: [PATCH v2] Enable setting attach as the def...
Christian Couder
[PATCH 1/3] rev-parse: add test script for "--verify"
Ramkumar Ramachandra
Re: [GSoC update] git-remote-svn: The final one
Junio C Hamano
Re: git-rm isn't the inverse action of git-add
openbsd-misc
:
Joachim Schipper
Re: UVC Webcams
Florin Andrei
SOLVED [was: firewall is very slow, something's wrong]
Todd Alan Smith
Re: Microsoft gets the Most Secure Operating Systems award
Neal Hogan
Re: Need Advice: Thinkpad T60 or T61?
Sam Fourman Jr.
Re: Real men don't attack straw men
git-commits-head
:
Linux Kernel Mailing List
ACPI: Disable ARB_DISABLE on platforms where it is not needed
Linux Kernel Mailing List
m68knommu: add read_barrier_depends() and irqs_disabled_flags()
Linux Kernel Mailing List
[MTD] Add mtd panic_write function pointer
Linux Kernel Mailing List
[ARM] pxa: remove duplicate select statements from Kconfig
Linux Kernel Mailing List
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER()
Colocation donated by:
Syndicate