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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4FC4D2F2.2070309@gmail.com>
Date:	Tue, 29 May 2012 07:45:22 -0600
From:	Tim Gardner <rtg.canonical@...il.com>
To:	Asias He <asias@...hat.com>
CC:	Jens Axboe <axboe@...nel.dk>, Tejun Heo <tj@...nel.org>,
	linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
	tim.gardner@...onical.com
Subject: Re: [PATCH V3] block: Mitigate lock unbalance caused by lock switching

On 05/28/2012 07:39 PM, Asias He wrote:

<snip>

> @@ -440,6 +435,11 @@ void blk_cleanup_queue(struct request_queue *q)
>  	del_timer_sync(&q->backing_dev_info.laptop_mode_wb_timer);
>  	blk_sync_queue(q);
>  
> +	spin_lock_irq(lock);
> +	if (q->queue_lock != &q->__queue_lock)
> +		q->queue_lock = &q->__queue_lock;
> +	spin_unlock_irq(lock);
> +

Isn't the 'if' clause superfluous ? You could just do the assignment, e.g.,

+	spin_lock_irq(lock);
+	q->queue_lock = &q->__queue_lock;
+	spin_unlock_irq(lock);

rtg
-- 
Tim Gardner tim.gardner@...onical.com
--
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