提交 fa7252ed 编写于 作者: J Jason Gunthorpe 提交者: Roland Dreier

IB: Make sure struct ib_user_mad.data is aligned

Make the untyped data region in ib_user_mad have type u64 so that it
gets aligned properly.  This avoids alignment faults in ib_umad when
casting the data field to an rmpp_mad and accessing the 64-bit tid
field on architectures like ia64.
Signed-off-by: NJason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: NRoland Dreier <rolandd@cisco.com>
上级 1033ff67
...@@ -98,7 +98,7 @@ struct ib_user_mad_hdr { ...@@ -98,7 +98,7 @@ struct ib_user_mad_hdr {
*/ */
struct ib_user_mad { struct ib_user_mad {
struct ib_user_mad_hdr hdr; struct ib_user_mad_hdr hdr;
__u8 data[0]; __u64 data[0];
}; };
/** /**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册