public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
* [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23)
       [not found] ` <4693E07E.4010300@mbligh.org>
@ 2007-07-10 22:15   ` Badari Pulavarty
  2007-07-10 23:55     ` Andrew Morton
  0 siblings, 1 reply; 4+ messages in thread
From: Badari Pulavarty @ 2007-07-10 22:15 UTC (permalink / raw)
  To: Martin Bligh, Alexey Dobriyan, Greg KH
  Cc: Andrew Morton, Hugh Dickins, Jeremy Orlow, Nick Piggin,
	Mingming Cao, ext4, ltc-kernel, stable

On Tue, 2007-07-10 at 12:39 -0700, Martin Bligh wrote:
> Andrew Morton wrote:
> > 
> > Begin forwarded message:
> > 
> > Date: Tue, 10 Jul 2007 21:49:23 +0400
> > From: Alexey Dobriyan <adobriyan@gmail.com>
> > To: Andrew Morton <akpm@linux-foundation.org>
> > Cc: linux-kernel@vger.kernel.org, linux-ext4@vger.kernel.org
> > Subject: ext2 reservations (Re: -mm merge plans for 2.6.23)
> > 
> > 
> >> ext2-reservations.patch
> >>
> >>  Still needs decent testing.
> > 
> > Was this oops silently fixed?
> > http://lkml.org/lkml/2007/3/2/138
> > 2.6.21-rc2-mm1: EIP is at ext2_discard_reservation+0x1c/0x52
> > 
> > I still have that ext2 partition backed up.
> 
> Now I'm confused - I thought there was a latent issue there, and
> then we went back and revisited it, and we decided there wasn't ;-(

Well, I looked at the problem now and here is the fix :)

Greg, Please consider this for stable release also.

Thanks,
Badari

ext2 reservation fix - Alexey Dobriyan reported ext2 discard
reservation panic while ago (http://lkml.org/lkml/2007/3/2/138).
If ext2_new_inode() fails for any reason it would end up calling 
ext2_discard_reservation() (due to last iput). Normally, it does
nothing since we don't have a reservation window structure
allocated. But the NULL pointer check wouldn't work with  slab 
poisioning, and causes oops.

Fix is to initialize i_block_alloc_info to NULL in ext2_alloc_inode()
code instead of assuming that it would be NULL. Same fix already
exists in ext3 and ext4.

Signed-off-by: Badari Pulavarty <pbadari@us.ibm.com>

 fs/ext2/super.c |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.22/fs/ext2/super.c
===================================================================
--- linux-2.6.22.orig/fs/ext2/super.c	2007-07-08 16:32:17.000000000 -0700
+++ linux-2.6.22/fs/ext2/super.c	2007-07-10 16:36:42.000000000 -0700
@@ -147,6 +147,7 @@ static struct inode *ext2_alloc_inode(st
 	ei->i_acl = EXT2_ACL_NOT_CACHED;
 	ei->i_default_acl = EXT2_ACL_NOT_CACHED;
 #endif
+	ei->i_block_alloc_info = NULL;
 	ei->vfs_inode.i_version = 1;
 	return &ei->vfs_inode;
 }

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23)
  2007-07-10 22:15   ` [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23) Badari Pulavarty
@ 2007-07-10 23:55     ` Andrew Morton
  2007-07-11  0:04       ` Badari Pulavarty
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Morton @ 2007-07-10 23:55 UTC (permalink / raw)
  To: Badari Pulavarty
  Cc: Martin Bligh, Alexey Dobriyan, Greg KH, Hugh Dickins,
	Jeremy Orlow, Nick Piggin, Mingming Cao, ext4, ltc-kernel, stable

On Tue, 10 Jul 2007 15:15:57 -0700
Badari Pulavarty <pbadari@us.ibm.com> wrote:

> Well, I looked at the problem now and here is the fix :)

whee, thanks.

> Greg, Please consider this for stable release also.

No, it is only relevant to -mm's ext2-reservations.patch.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23)
  2007-07-10 23:55     ` Andrew Morton
@ 2007-07-11  0:04       ` Badari Pulavarty
  2007-07-11  0:21         ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Badari Pulavarty @ 2007-07-11  0:04 UTC (permalink / raw)
  To: Andrew Morton
  Cc: Martin Bligh, Alexey Dobriyan, Greg KH, Hugh Dickins,
	Jeremy Orlow, Nick Piggin, Mingming Cao, ext4, stable

On Tue, 2007-07-10 at 16:55 -0700, Andrew Morton wrote:
> On Tue, 10 Jul 2007 15:15:57 -0700
> Badari Pulavarty <pbadari@us.ibm.com> wrote:
> 
> > Well, I looked at the problem now and here is the fix :)
> 
> whee, thanks.
> 
> > Greg, Please consider this for stable release also.
> 
> No, it is only relevant to -mm's ext2-reservations.patch.

Yes. Sorry. I was looking at -mm tree and assumed that
ext2-reservation code made into mainline also :(

Greg, please ignore the patch for stable.

Thanks,
Badari

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23)
  2007-07-11  0:04       ` Badari Pulavarty
@ 2007-07-11  0:21         ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2007-07-11  0:21 UTC (permalink / raw)
  To: Badari Pulavarty
  Cc: Andrew Morton, Martin Bligh, Alexey Dobriyan, Hugh Dickins,
	Jeremy Orlow, Nick Piggin, Mingming Cao, ext4, stable

On Tue, Jul 10, 2007 at 05:04:17PM -0700, Badari Pulavarty wrote:
> On Tue, 2007-07-10 at 16:55 -0700, Andrew Morton wrote:
> > On Tue, 10 Jul 2007 15:15:57 -0700
> > Badari Pulavarty <pbadari@us.ibm.com> wrote:
> > 
> > > Well, I looked at the problem now and here is the fix :)
> > 
> > whee, thanks.
> > 
> > > Greg, Please consider this for stable release also.
> > 
> > No, it is only relevant to -mm's ext2-reservations.patch.
> 
> Yes. Sorry. I was looking at -mm tree and assumed that
> ext2-reservation code made into mainline also :(
> 
> Greg, please ignore the patch for stable.

Ok, dropped from my -stable queue mbox.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-07-11  0:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20070710113704.8b20f3c3.akpm@linux-foundation.org>
     [not found] ` <4693E07E.4010300@mbligh.org>
2007-07-10 22:15   ` [PATHC] Fix for ext2 reservation (Re: -mm merge plans for 2.6.23) Badari Pulavarty
2007-07-10 23:55     ` Andrew Morton
2007-07-11  0:04       ` Badari Pulavarty
2007-07-11  0:21         ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox