Skip to content

Commit

Permalink
IB/uverbs: Fix alignment of struct ib_uverbs_create_qp_resp
Browse files Browse the repository at this point in the history
The size of struct ib_uverbs_create_qp_resp is not even multiple of 8
bytes.  This causes problems for low-level drivers that add private
data after the structure: 32-bit userspace will look in the wrong
place for a response from a 64-bit kernel.  Fix this by adding a
reserved field.  Also, bump the ABI version because this changes the
size of a structure.

Pointed out by Hoang-Nam Nguyen <HNGUYEN@de.ibm.com>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Roland Dreier committed Mar 20, 2006
1 parent 00df1b2 commit 4d9781c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/rdma/ib_user_verbs.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
* Increment this value if any changes that break userspace ABI
* compatibility are made.
*/
#define IB_USER_VERBS_ABI_VERSION 4
#define IB_USER_VERBS_ABI_VERSION 5

enum {
IB_USER_VERBS_CMD_GET_CONTEXT,
Expand Down Expand Up @@ -350,6 +350,7 @@ struct ib_uverbs_create_qp_resp {
__u32 max_send_sge;
__u32 max_recv_sge;
__u32 max_inline_data;
__u32 reserved;
};

/*
Expand Down

0 comments on commit 4d9781c

Please sign in to comment.