[ofa-general] [PATCH] opensm/osm_qos_policy.c: trivial fix in passing wrong pointer
Yevgeny Kliteynik
kliteyn at dev.mellanox.co.il
Mon Jan 7 07:13:56 PST 2008
st_lookup() returned node in the p_node pointer and replaced
the node that was intended to be inserted into the queue,
which caused infinite loop.
Besides, if st_lookup() does finds an element in the hash,
we're only interested to know that it did - don't need the
actual element.
Please apply to ofed_1_3 and master.
Signed-off-by: Yevgeny Kliteynik <kliteyn at dev.mellanox.co.il>
---
opensm/opensm/osm_qos_policy.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
diff --git a/opensm/opensm/osm_qos_policy.c b/opensm/opensm/osm_qos_policy.c
index 6140de0..bde1e7e 100644
--- a/opensm/opensm/osm_qos_policy.c
+++ b/opensm/opensm/osm_qos_policy.c
@@ -77,8 +77,7 @@ __build_nodebyname_hash(osm_qos_policy_t * p_qos_policy)
p_node != (osm_node_t *) cl_qmap_end(p_node_guid_tbl);
p_node = (osm_node_t *) cl_qmap_next(&p_node->map_item)) {
if (!st_lookup(p_qos_policy->p_node_hash,
- (st_data_t)p_node->print_desc,
- (st_data_t*)&p_node))
+ (st_data_t)p_node->print_desc, NULL))
st_insert(p_qos_policy->p_node_hash,
(st_data_t)p_node->print_desc,
(st_data_t)p_node);
--
1.5.1.4
More information about the general
mailing list