소스 검색

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>
Jason Gunthorpe 18 년 전
부모
커밋
fa7252ed4d
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      include/rdma/ib_user_mad.h

+ 1 - 1
include/rdma/ib_user_mad.h

@@ -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];
 };
 
 /**