lkml.org 
[lkml]   [2005]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[openib-general] [PATCH][13/12] InfiniBand/mthca: initialize mutex earlier
From
Date
One more bug that slipped in...


The cap_mask_mutex needs to be initialized before
ib_register_device(), because device registration will call client
init functions that may try to modify the capability mask.

Signed-off-by: Roland Dreier <roland@topspin.com>

--- linux-bk.orig/drivers/infiniband/hw/mthca/mthca_provider.c 2005-01-23 21:51:46.000000000 -0800
+++ linux-bk/drivers/infiniband/hw/mthca/mthca_provider.c 2005-01-24 10:39:12.623987624 -0800
@@ -634,6 +634,8 @@
dev->ib_dev.detach_mcast = mthca_multicast_detach;
dev->ib_dev.process_mad = mthca_process_mad;

+ init_MUTEX(&dev->cap_mask_mutex);
+
ret = ib_register_device(&dev->ib_dev);
if (ret)
return ret;
@@ -647,8 +649,6 @@
}
}

- init_MUTEX(&dev->cap_mask_mutex);
-
return 0;
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:09    [W:0.218 / U:0.036 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site