[ofa-general] [PATCH] IB/mad: fix duplicated kernel thread name
Or Gerlitz
ogerlitz at voltaire.com
Tue Jul 10 22:57:05 PDT 2007
Roland,
This is the best I could come with, its still a problem
if you have multiple devices of different providers or
more than ten devices of the same provider... any other idea?
--------------------------------------------------------------
The mad module creates thread per active port where the thread name is
derived from the port name. This cause different threads to have same
names when there are multiple devices. Fix that by using both the device
and the port numbers to derive the name.
Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>
Index: linux-2.6.22-rc2/drivers/infiniband/core/mad.c
===================================================================
--- linux-2.6.22-rc2.orig/drivers/infiniband/core/mad.c 2007-05-20 09:37:29.000000000 +0300
+++ linux-2.6.22-rc2/drivers/infiniband/core/mad.c 2007-07-11 08:38:59.000000000 +0300
@@ -2799,7 +2799,7 @@ static int ib_mad_port_open(struct ib_de
if (ret)
goto error7;
- snprintf(name, sizeof name, "ib_mad%d", port_num);
+ snprintf(name, sizeof name, "ib_mad%d_%d", device->name[strlen(device->name)],port_num);
port_priv->wq = create_singlethread_workqueue(name);
if (!port_priv->wq) {
ret = -ENOMEM;
More information about the general
mailing list