Fix several valgrind false positives

Fix several issues that were reported by valgrind:

* Initialize reserved attributes of command structures

* Fix the pointer and size when calling VALGRIND_MAKE_MEM_DEFINED in
  ibv_cmd_reg_mr() and ibv_cmd_create_cq_v2(): if we have struct
  xxx_resp *resp and resp_size, we need to do

	VALGRIND_MAKE_MEM_DEFINED(resp, resp_size)

  rather than the getting the paramters wrong as in

	VALGRIND_MAKE_MEM_DEFINED(&resp, sizeof resp)
	VALGRIND_MAKE_MEM_DEFINED(resp, sizeof resp_size);

* Call VALGRIND_MAKE_MEM_DEFINED for buffers that are filled by
  the kernel in ibv_cmd_query_srq(), ibv_cmd_destroy_srq() and
  ibv_cmd_query_qp().

Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
1 file changed