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: <20220919124344.muyhkpxm4d3wumd3@quack3>
Date:   Mon, 19 Sep 2022 14:43:44 +0200
From:   Jan Kara <jack@...e.cz>
To:     Ye Bin <yebin10@...wei.com>
Cc:     tytso@....edu, adilger.kernel@...ger.ca,
        linux-ext4@...r.kernel.org, linux-kernel@...r.kernel.org,
        jack@...e.cz
Subject: Re: [PATCH -next] jbd2: add miss release buffer head in
 fc_do_one_pass()

On Sat 17-09-22 17:38:05, Ye Bin wrote:
> In fc_do_one_pass() miss release buffer head after use which will lead
> to reference count leak.
> 
> Signed-off-by: Ye Bin <yebin10@...wei.com>

Indeed. Good catch! Feel free to add:

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

								Honza

> ---
>  fs/jbd2/recovery.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/fs/jbd2/recovery.c b/fs/jbd2/recovery.c
> index 1f878c315b03..8286a9ec122f 100644
> --- a/fs/jbd2/recovery.c
> +++ b/fs/jbd2/recovery.c
> @@ -261,6 +261,7 @@ static int fc_do_one_pass(journal_t *journal,
>  		err = journal->j_fc_replay_callback(journal, bh, pass,
>  					next_fc_block - journal->j_fc_first,
>  					expected_commit_id);
> +		brelse(bh);
>  		next_fc_block++;
>  		if (err < 0 || err == JBD2_FC_REPLAY_STOP)
>  			break;
> -- 
> 2.31.1
> 
-- 
Jan Kara <jack@...e.com>
SUSE Labs, CR

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ