From: Jan Kara <jack@suse.cz>
To: Josef Bacik <jbacik@redhat.com>
Cc: 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 19:47:22 +0200 [thread overview]
Message-ID: <20080414174722.GG15824@duck.suse.cz> (raw)
In-Reply-To: <20080411184258.GA2757@unused.rdu.redhat.com>
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?
Honza
--
Jan Kara <jack@suse.cz>
SUSE Labs, CR
next prev parent reply other threads:[~2008-04-14 17:47 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 [this message]
2008-04-14 17:50 ` Josef Bacik
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=20080414174722.GG15824@duck.suse.cz \
--to=jack@suse.cz \
--cc=jack@cygnusx-1.org \
--cc=jbacik@redhat.com \
--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