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: <20170518091253.GE25462@dhcp22.suse.cz>
Date:   Thu, 18 May 2017 11:12:53 +0200
From:   Michal Hocko <mhocko@...nel.org>
To:     Tahsin Erdogan <tahsin@...gle.com>
Cc:     Theodore Ts'o <tytso@....edu>, Jan Kara <jack@...e.com>,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] jbd2: preserve original nofs flag during journal
 restart

On Wed 17-05-17 09:16:29, Tahsin Erdogan wrote:
[...]
> diff --git a/fs/jbd2/transaction.c b/fs/jbd2/transaction.c
> index 9ee4832b6f8b..05c0323493fb 100644
> --- a/fs/jbd2/transaction.c
> +++ b/fs/jbd2/transaction.c
> @@ -680,6 +680,8 @@ int jbd2__journal_restart(handle_t *handle, int nblocks, gfp_t gfp_mask)
> 
>  	rwsem_release(&journal->j_trans_commit_map, 1, _THIS_IP_);
>  	handle->h_buffer_credits = nblocks;
> +	/* Restore original nofs flag as jbd2_journal_stop() would do. */

I was thinking something more specific like
	/*
	 * Restore the original nofs context because the journal restart
	 * is basically the same thing as journal stop and start.
	 * start_this_handle will start a new nofs context.
	 */
> +	memalloc_nofs_restore(handle->saved_alloc_context);
>  	ret = start_this_handle(journal, handle, gfp_mask);
>  	return ret;
>  }
> -- 
> 2.13.0.303.g4ebf302169-goog
> 

-- 
Michal Hocko
SUSE Labs

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ