[openib-general] Uninitialized structure field in ib_uverbs_create_ah()

Ralph Campbell ralphc at pathscale.com
Thu Dec 29 13:00:06 PST 2005


The attr.ah_flags field is not being initialized.
Here is a patch:

Index: uverbs_cmd.c
===================================================================
--- uverbs_cmd.c	(revision 4654)
+++ uverbs_cmd.c	(working copy)
@@ -1448,6 +1448,7 @@
 	attr.sl 	       = cmd.attr.sl;
 	attr.src_path_bits     = cmd.attr.src_path_bits;
 	attr.static_rate       = cmd.attr.static_rate;
+	attr.ah_flags          = cmd.attr.is_global ? IB_AH_GRH : 0;
 	attr.port_num 	       = cmd.attr.port_num;
 	attr.grh.flow_label    = cmd.attr.grh.flow_label;
 	attr.grh.sgid_index    = cmd.attr.grh.sgid_index;


-- 
Ralph Campbell <ralphc at pathscale.com>




More information about the general mailing list