[dm-devel] [patch] dm-raid1.c a race bug in rh_dec()

Alasdair G Kergon agk at redhat.com
Tue Aug 2 20:49:25 UTC 2005


On Thu, Jun 16, 2005 at 02:40:05PM +0800, Zhao Qian wrote:
> patch here to avoid race condition:
 
And further analysis turns up several more races too.

But how many are left after applying the following patch?

Alasdair

--- linux-2.6.9/drivers/md/dm-raid1.c	2005-07-08 22:05:19.000000000 +0100
+++ linux-2.6.9-test/drivers/md/dm-raid1.c	2005-08-02 21:44:32.000000000 +0100
@@ -1229,7 +1230,7 @@ static int __init dm_mirror_init(void)
 	if (r)
 		return r;
 
-	_kmirrord_wq = create_workqueue("kmirrord");
+	_kmirrord_wq = create_singlethread_workqueue("kmirrord");
 	if (!_kmirrord_wq) {
 		DMERR("couldn't start kmirrord");
 		dm_dirty_log_exit();




More information about the dm-devel mailing list