[openib-general] [patch] mad.c, agent.c spinlocking on UP
Bernhard Fischer
blist at aon.at
Tue Nov 16 10:30:19 PST 2004
Hi,
from linux/spinlock.h: "spin_is_locked on UP always says FALSE"
please consider applying,
-------------- next part --------------
diff -x '*.diff' -rup gen2.oorig/src/linux-kernel/infiniband/core/agent.c gen2/src/linux-kernel/infiniband/core/agent.c
--- gen2.oorig/src/linux-kernel/infiniband/core/agent.c 2004-11-12 16:29:26.000000000 +0100
+++ gen2/src/linux-kernel/infiniband/core/agent.c 2004-11-16 19:11:04.595949168 +0100
@@ -42,7 +42,9 @@ __ib_get_agent_port(struct ib_device *de
{
struct ib_agent_port_private *entry;
+#if defined(CONFIG_SMP)
BUG_ON(!spin_is_locked(&ib_agent_port_list_lock));
+#endif
BUG_ON(!(!!device ^ !!mad_agent)); /* Exactly one MUST be (!NULL) */
if (device) {
diff -x '*.diff' -rup gen2.oorig/src/linux-kernel/infiniband/core/mad.c gen2/src/linux-kernel/infiniband/core/mad.c
--- gen2.oorig/src/linux-kernel/infiniband/core/mad.c 2004-11-16 17:24:36.000000000 +0100
+++ gen2/src/linux-kernel/infiniband/core/mad.c 2004-11-16 19:09:25.577038602 +0100
@@ -100,7 +100,9 @@ __ib_get_mad_port(struct ib_device *devi
{
struct ib_mad_port_private *entry;
+#if defined(CONFIG_SMP)
BUG_ON(!spin_is_locked(&ib_mad_port_list_lock));
+#endif
list_for_each_entry(entry, &ib_mad_port_list, port_list) {
if (entry->device == device && entry->port_num == port_num)
return entry;
More information about the general
mailing list