Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>

authored by

Jason Gunthorpe and committed by
Roland Dreier
fa7252ed 1033ff67

+1 -1
+1 -1
include/rdma/ib_user_mad.h
··· 98 98 */ 99 99 struct ib_user_mad { 100 100 struct ib_user_mad_hdr hdr; 101 - __u8 data[0]; 101 + __u64 data[0]; 102 102 }; 103 103 104 104 /**