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: <20090921181527.GA27777@duck.suse.cz>
Date:	Mon, 21 Sep 2009 20:15:27 +0200
From:	Jan Kara <jack@...e.cz>
To:	Mingming <cmm@...ibm.com>
Cc:	linux-ext4@...r.kernel.org, tytso@....edu
Subject: Re: [PATCH] Ext4: avoid multiple quota reservation when retry
	block reservation for delalloc

On Mon 21-09-09 09:52:30, Mingming wrote:
> Ext4: release reserved quota before block reservation for delalloc retry
> 
> ext4_da_reserve_space() can reserve quota blocks multiple times if
> ext4_claim_free_blocks() fail and we retry the allocation. We should
> release the quota reservation before restarting.
> 
> Bug found be Jan Kara.
            ^^ by
> 
> Signed-off-by: Mingming Cao <cmm@...ibm.com>
> 
> ---
>  fs/ext4/inode.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6.31-rc4/fs/ext4/inode.c
> ===================================================================
> --- linux-2.6.31-rc4.orig/fs/ext4/inode.c
> +++ linux-2.6.31-rc4/fs/ext4/inode.c
> @@ -1785,11 +1785,11 @@ repeat:
>  
>  	if (ext4_claim_free_blocks(sbi, total)) {
>  		spin_unlock(&EXT4_I(inode)->i_block_reservation_lock);
> +		vfs_dq_release_reservation_block(inode, total);
>  		if (ext4_should_retry_alloc(inode->i_sb, &retries)) {
>  			yield();
>  			goto repeat;
>  		}
> -		vfs_dq_release_reservation_block(inode, total);
>  		return -ENOSPC;
>  	}
>  	EXT4_I(inode)->i_reserved_data_blocks += nrblocks;
> 
  The patch is fine. Acked-by: Jan Kara <jack@...e.cz>
But it's certainly not the issue hit by Pavol but I'm out of ideas where
could be a problem provided he runs with extents...

								Honza
-- 
Jan Kara <jack@...e.cz>
SUSE Labs, CR
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ