[openib-general] bug in libmthca/src/verbs.c?

Robert Pearson rpearson at systemfabricworks.com
Fri Aug 25 22:40:16 PDT 2006


struct ibv_cq *mthca_create_cq(struct ibv_context *context, int cqe,

                               struct ibv_comp_channel *channel,

                               int comp_vector)

{

        struct mthca_create_cq      cmd;

-------------> snip <--------------

        ret = ibv_cmd_create_cq(context, cqe - 1, channel, comp_vector,

                                &cq->ibv_cq, &cmd.ibv_cmd, sizeof cmd,

 

                                                           ^^^^^^^^^^

 

                                &resp.ibv_resp, sizeof resp);

 

The command size passed to ibv_cmd_create_cq is the size of the mthca
command wrapper which is larger than what is most likely expected.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openfabrics.org/pipermail/general/attachments/20060826/451740d1/attachment.html>


More information about the general mailing list