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  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:   Wed, 09 Jan 2019 12:51:28 -0800
From:   Bart Van Assche <bvanassche@....org>
To:     Jaegeuk Kim <jaegeuk@...nel.org>, Jens Axboe <axboe@...nel.dk>
Cc:     linux-kernel@...r.kernel.org, linux-block@...r.kernel.org
Subject: Re: [PATCH v3] loop: drop caches if offset or block_size are changed

On Tue, 2018-12-18 at 14:41 -0800, Jaegeuk Kim wrote:
> [ ... ]

Please post new versions of a patch as a new e-mail thread instead of
as a reply to a previous e-mail.

> [ ... ]
>
>  	if (lo->lo_offset != info->lo_offset ||
>  	    lo->lo_sizelimit != info->lo_sizelimit) {
> +		/* kill_bdev should have truncated all the pages */
> +		if (lo->lo_device->bd_inode->i_mapping->nrpages) {
> +			err = -EAGAIN;
> +			goto exit;
> +		}

Please add a pr_info() or pr_warn() statement here such that it becomes
easy for the user to figure out why EAGAIN has been returned.

>  	blk_mq_freeze_queue(lo->lo_queue);
>  
> +	/* kill_bdev should have truncated all the pages */
> +	if (lo->lo_queue->limits.logical_block_size != arg &&
> +			lo->lo_device->bd_inode->i_mapping->nrpages) {
> +		err = -EAGAIN;
> +		goto out;
> +	}

Same comment here. Additionally, please consider renaming the "out" label
into "unfreeze" or so. I think that will make the use of label names more
consistent with the rest of the block layer. Once these two comments are
addressed, feel free to add:

Reviewed-by: Bart Van Assche <bvanassche@....org>


Powered by blists - more mailing lists