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: <20120213232742.GH3130@redhat.com>
Date:	Mon, 13 Feb 2012 18:27:42 -0500
From:	Vivek Goyal <vgoyal@...hat.com>
To:	Tejun Heo <tj@...nel.org>
Cc:	Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org
Subject: Re: [PATCH block/for-linus] block: blk-throttle should be drained
 regardless of q->elevator

On Mon, Feb 13, 2012 at 02:52:48PM -0800, Tejun Heo wrote:
> Currently, blk_cleanup_queue() doesn't call elv_drain_elevator() if
> q->elevator doesn't exist; however, bio based drivers don't have
> elevator initialized but can still use blk-throttle.  This patch moves
> q->elevator test inside blk_drain_queue() such that only
> elv_drain_elevator() is skipped if !q->elevator.
> 
> Signed-off-by: Tejun Heo <tj@...nel.org>
> Reported-by: Vivek Goyal <vgoyal@...hat.com>

Thanks Tejun for fixing this. Looks good to me. Just a minor nit below.

Acked-by: Vivek Goyal <vgoyal@...hat.com>

Vivek

[..]
> @@ -428,13 +434,8 @@ void blk_cleanup_queue(struct request_qu
>  	spin_unlock_irq(lock);
>  	mutex_unlock(&q->sysfs_lock);
>  
> -	/*
> -	 * Drain all requests queued before DEAD marking.  The caller might
> -	 * be trying to tear down @q before its elevator is initialized, in
> -	 * which case we don't want to call into draining.
> -	 */
> -	if (q->elevator)
> -		blk_drain_queue(q, true);
> +	/* drain all requests queued before DEAD marking */

We have already marked the queue DEAD before we start draining the queue.
May be we need to fix the comment.

> +	blk_drain_queue(q, true);
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ