public inbox for linux-ext4@vger.kernel.org
 help / color / mirror / Atom feed
From: Josef Bacik <jbacik@redhat.com>
To: Jan Kara <jack@suse.cz>
Cc: Josef Bacik <jbacik@redhat.com>,
	Nathan Grennan <jack@cygnusx-1.org>,
	Marcelo Tosatti <mtosatti@redhat.com>,
	linux-ext4@vger.kernel.org
Subject: Re: Ordered mode rewrite patch
Date: Mon, 14 Apr 2008 13:50:35 -0400	[thread overview]
Message-ID: <20080414175034.GB20924@unused.rdu.redhat.com> (raw)
In-Reply-To: <20080414174722.GG15824@duck.suse.cz>

On Mon, Apr 14, 2008 at 07:47:22PM +0200, Jan Kara wrote:
>   Hi Josef,
> 
> On Fri 11-04-08 14:42:58, Josef Bacik wrote:
> > On Tue, Apr 08, 2008 at 02:11:49PM +0200, Jan Kara wrote:
> > >   Hello,
> > > 
> > >   attached is a jumbo patch that reverses locking order of transaction
> > > start and page lock in ext3 and rewrites handling of ordered data mode in
> > > JBD and ext3. Note that the patch will break compilation of ext4 and OCFS2.
> > > The patch survives LTP run on my test machine so it shouldn't eat your data
> > > immediately but bugs are of course possible...
> > >   I'm very interested in any results (both positive and negative) you could
> > > get with it :). Thanks for testing it.
> > > 
> > > 									Honza
> > I just hit a problem with your patch.  In journal_destroy() we do a
> > iput(journal->j_inode) and then kfree the journal, so when the iput comes back
> > into journal_release_jbd_inode we are doing a use after free which in my case
> > resulted in a panic.  I was going to fix it but I figure since this is still in
> > transit you would have to just rewrite it so I'm not going to attach one, just
> > giving you a heads up.  Let me know if my explanation wasn't clear enough.
>   Thanks for letting me know. But I don't quite get it:
> journal_destroy() does:
>         if (journal->j_inode)
>                 iput(journal->j_inode);
>         if (journal->j_revoke)
>                 journal_destroy_revoke(journal);
>         kfree(journal->j_wbuf);
>         kfree(journal);
> }
> 
>   iput() will eventually call generic_forget_inode() which calls
> clear_inode() in which we do journal_release_jbd_inode(). But at that
> moment journal still exists to I don't see any use after free... But
> possibly there could be some other inode in the inode list but which one is
> it?
>

Hmm sorry in my pretend world iput goes off and does its thing and everything
keeps going...  You are right it cant be that inode, but I definitely got a
panic so there must be some other inode in the inode list that is getting freed
after the journal is freed.  Thanks much,

Josef 

  reply	other threads:[~2008-04-14 17:59 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-04-08 12:11 Ordered mode rewrite patch Jan Kara
2008-04-08 12:19 ` Christoph Hellwig
2008-04-09 14:48   ` Jan Kara
2008-04-08 15:47 ` Josef Bacik
2008-04-08 21:10   ` Jan Kara
2008-04-08 20:12 ` Nathan Grennan
2008-04-08 21:16   ` Jan Kara
2008-04-11 18:42 ` Josef Bacik
2008-04-14 17:47   ` Jan Kara
2008-04-14 17:50     ` Josef Bacik [this message]
2008-04-25 14:23 ` Marcelo Tosatti

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080414175034.GB20924@unused.rdu.redhat.com \
    --to=jbacik@redhat.com \
    --cc=jack@cygnusx-1.org \
    --cc=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mtosatti@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox