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: <20191028152808.GB4404@mit.edu>
Date:   Mon, 28 Oct 2019 11:28:08 -0400
From:   "Theodore Y. Ts'o" <tytso@....edu>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-ext4@...r.kernel.org, Thomas Gleixner <tglx@...utronix.de>,
        Peter Zijlstra <peterz@...radead.org>,
        Ingo Molnar <mingo@...nel.org>,
        Steven Rostedt <rostedt@...dmis.org>,
        Anna-Maria Gleixner <anna-maria@...utronix.de>,
        Julia Cartwright <julia@...com>
Subject: Re: [PATCH 5/7] jbd2: Don't call __bforget() unnecessarily

On Fri, Aug 09, 2019 at 02:42:31PM +0200, Jan Kara wrote:
> @@ -1660,10 +1660,9 @@ int jbd2_journal_forget (handle_t *handle, struct buffer_head *bh)
>  		__jbd2_journal_file_buffer(jh, transaction, BJ_Forget);
>  		spin_unlock(&journal->j_list_lock);
>  	}
> -
> +drop:
>  	jbd_unlock_bh_state(bh);
>  	__brelse(bh);
> -drop:
>  	if (drop_reserve) {
>  		/* no need to reserve log space for this block -bzzz */
>  		handle->h_buffer_credits++;

(Workflow observation: this is an example where Gerrit can be *so*
*much* *better* than e-mail review at times; sometimes, you *really*
want to see more context than what e-mail affords you.)

After this patch, the resulting code looks like this:

-----
drop:
	jbd_unlock_bh_state(bh);
	__brelse(bh);
	if (drop_reserve) {
		/* no need to reserve log space for this block -bzzz */
		handle->h_buffer_credits++;
	}
	return err;

not_jbd:
	jbd_unlock_bh_state(bh);
	__bforget(bh);
	goto drop;
----

And we still have a case we jump to not_jbd, at which point hilarity
will ensue.

This is cleaned up in the following patch in this sequence, but this
leaves us in a not-great state if we are ever bisecting.

					- Ted

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ