Message ID | 560f1909a3d7db2fffd57c5da4954ebde7f4223c.1412163687.git.ydroneaud@opteya.com (mailing list archive) |
---|---|
State | Rejected |
Headers | show |
diff --git a/src/cmd.c b/src/cmd.c index f80ce4d30832..f9e4a03fd84d 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -785,6 +785,7 @@ int ibv_cmd_open_qp(struct ibv_context *context, struct verbs_qp *qp, cmd->pd_handle = xrcd->handle; cmd->qpn = attr->qp_num; cmd->qp_type = attr->qp_type; + memset(cmd->reserved, 0, sizeof(cmd->reserved)); if (write(context->cmd_fd, cmd, cmd_size) != cmd_size) return errno;
Properly initialize data structure exchanged with kernel uverbs layer: - may remove valgrind spurious warnings; - may allow to use the field later for future expansion. Link: http://marc.info/?i=cover.1412163687.git.ydroneaud@opteya.com Fixes: 5f5292bbc51fb ('Add ibv_open_qp() for XRC receive QPs') Cc: Sean Hefty <sean.hefty@intel.com> Cc: Yishai Hadas <yishaih@mellanox.com> Signed-off-by: Yann Droneaud <ydroneaud@opteya.com> --- src/cmd.c | 1 + 1 file changed, 1 insertion(+)