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: <20240730132159.opjknn477owojkrq@quack3>
Date: Tue, 30 Jul 2024 15:21:59 +0200
From: Jan Kara <jack@...e.cz>
To: Kemeng Shi <shikemeng@...weicloud.com>
Cc: tytso@....edu, jack@...e.com, linux-ext4@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 1/7] jbd2: correctly compare tids with tid_geq function
 in jbd2_fc_begin_commit

On Tue 30-07-24 19:33:29, Kemeng Shi wrote:
> Use tid_geq to compare tids to work over sequence number wraps.
> 
> Signed-off-by: Kemeng Shi <shikemeng@...weicloud.com>
> ---
>  fs/jbd2/journal.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

Indeed, Luis seems to have missed this when fixing these bugs recently.
Feel free to add:

Reviewed-by: Jan Kara <jack@...e.cz>

								Honza

> 
> diff --git a/fs/jbd2/journal.c b/fs/jbd2/journal.c
> index 1ebf2393bfb7..da5a56d700f1 100644
> --- a/fs/jbd2/journal.c
> +++ b/fs/jbd2/journal.c
> @@ -710,7 +710,7 @@ int jbd2_fc_begin_commit(journal_t *journal, tid_t tid)
>  		return -EINVAL;
>  
>  	write_lock(&journal->j_state_lock);
> -	if (tid <= journal->j_commit_sequence) {
> +	if (tid_geq(journal->j_commit_sequence, tid)) {
>  		write_unlock(&journal->j_state_lock);
>  		return -EALREADY;
>  	}
> -- 
> 2.30.0
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ