[openib-general] [PATCH] IB/core - ib_umad can cause address alignment fault onia64

Ralph Campbell ralph.campbell at qlogic.com
Thu Jan 18 09:56:19 PST 2007


On Thu, 2007-01-18 at 19:50 +0200, Michael S. Tsirkin wrote:
> > The int -> long change is needed because struct ib_umad_packet
> > includes struct ib_user_mad (which has 4 byte alignment) but
> > is then cast to struct ib_mad_hdr which has 8 byte alignment.
> 
> But I thought it is the data field which is cast to ib_mad_hdr
> and not ib_user_mad? If so Jason's suggestion of using
> 	u64 data[0]
> makes more sense.

That looks OK to me too.
It would cover other MAD packet types like get/set GUIDs too.





More information about the general mailing list