Skip to content

Commit

Permalink
IB: Make sure struct ib_user_mad.data is aligned
Browse files Browse the repository at this point in the history
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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
  • Loading branch information
Jason Gunthorpe authored and Roland Dreier committed Feb 4, 2007
1 parent 1033ff6 commit fa7252e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/rdma/ib_user_mad.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ struct ib_user_mad_hdr {
*/
struct ib_user_mad {
struct ib_user_mad_hdr hdr;
__u8 data[0];
__u64 data[0];
};

/**
Expand Down

0 comments on commit fa7252e

Please sign in to comment.