lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20110608140914.GF30037@thunk.org>
Date:	Wed, 8 Jun 2011 10:09:14 -0400
From:	Ted Ts'o <tytso@....edu>
To:	Jan Kara <jack@...e.cz>
Cc:	linux-ext4@...r.kernel.org
Subject: Re: [PATCH] jbd2: Fix oops in jbd2_journal_remove_journal_head()

Ping?

				- Ted

On Mon, Jun 06, 2011 at 10:16:30AM -0400, Ted Ts'o wrote:
> On Mon, May 30, 2011 at 05:12:58PM +0200, Jan Kara wrote:
> >  /*
> > - * For the unlocked version of this call, also make sure that any
> > - * hanging journal_head is cleaned up if necessary.
> > + * For the unlocked version of this call, also drop buffer_head reference.
> >   *
> >   * __jbd2_journal_refile_buffer is usually called as part of a single locked
>      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 
> Doesn't this paragraph refer to jbd2_journal_refile_buffer(), not
> __jbd2_journal_refile_buffer()?  Or am I missing something?
> 
> >  void jbd2_journal_refile_buffer(journal_t *journal, struct journal_head *jh)
> >  {
> >  	struct buffer_head *bh = jh2bh(jh);
> >  
> > +	/* Get reference so that buffer cannot be freed before we unlock it */
> > +	get_bh(bh);
> 
> OK, so we're adding a get_bh(bh) call to jbd2_journal_refile_buffer(),
> which we're not freeing later in the function.  So this means every
> single place where we call jbd2_journal_refile_buffer(), we'd better
> add put_bh(bh) or bhrelse(bh) call, right?
> 
> So in fs/jbd2/commit.c, line 418, in jbd2_journal_commit_transaction(),
> I see a call to jbd2_journal_refile_buffer(), which the patch doesn't
> seem to adjust.  Looks like this could cause a buffer leak?
> 
> In your testing, have you checked to the slab cache to make sure there
> isn't any memory leakage going on with buffer heads?
> 
>       	  	 	       	       - Ted
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ