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]
Date:   Thu, 12 Aug 2021 12:48:01 -0400
From:   "Theodore Ts'o" <tytso@....edu>
To:     Jan Kara <jack@...e.cz>
Cc:     linux-ext4@...r.kernel.org, Lukas Czerner <lczerner@...hat.com>
Subject: Re: [PATCH 5/5] ext4: Improve scalability of ext4 orphan file
 handling

On Wed, Aug 11, 2021 at 12:19:15PM +0200, Jan Kara wrote:
> diff --git a/fs/ext4/orphan.c b/fs/ext4/orphan.c
> index 019719c0ac12..18622ddeb41b 100644
> --- a/fs/ext4/orphan.c
> +++ b/fs/ext4/orphan.c
> @@ -28,28 +43,40 @@ static int ext4_orphan_file_add(handle_t *handle, struct inode *inode)
>  		 */
>  		return -ENOSPC;
>  	}
> -	oi->of_binfo[i].ob_free_entries--;
> -	spin_unlock(&oi->of_lock);
>  
> -	/*
> -	 * Get access to orphan block. We have dropped of_lock but since we
> -	 * have decremented number of free entries we are guaranteed free entry
> -	 * in our block.
> -	 */
>  	ret = ext4_journal_get_write_access(handle, inode->i_sb,
>  				oi->of_binfo[i].ob_bh, EXT4_JTR_ORPHAN_FILE);
>  	if (ret)
>  		return ret;

Shouldn't there be a call to:

		atomic_inc(&oi->of_binfo[i].ob_free_entries);

before we return, so the free_entry count stays consistent?

Otherwise, with the test-bot comments also addressed, you can add:

Reviewed-by: Theodore Ts'o <tytso@....edu>

Thanks,


       	  	     	 	    	  - Ted

Powered by blists - more mailing lists