From: "John W. Linville" <linville@xxxxxxxxxxxxx> Date: Fri, 5 Jun 2009 14:50:48 -0400 > On Fri, Jun 05, 2009 at 07:29:07PM +0200, Michael Buesch wrote: >> On Friday 05 June 2009 14:25:03 John W. Linville wrote: >> > On Thu, Jun 04, 2009 at 11:18:33PM +0200, Michael Buesch wrote: >> > > From: Matthieu CASTET <castet.matthieu@xxxxxxx> >> > > >> > > Fix possible unaligned u32 access in b43_generate_plcp_hdr(). >> > > Unaligned data is read/write with a u32 pointer instead of using the >> > > packed structure. Some versions of gcc ignore the "packed" attribute, if the >> > > structure element is accessed through a local pointer. >> > > >> > > Signed-off-by: Matthieu CASTET <castet.matthieu@xxxxxxx> >> > > Signed-off-by: Michael Buesch <mb@xxxxxxxxx> >> > >> > That seems pretty brain-dead...can you cite a source for this >> > information? The patch seems like a no-op... >> > >> > John >> >> struct foo { >> int data; >> } __attribute__((packed)); >> >> struct foo foo; >> int *d = &foo->data; >> foo->data = x; /* Works for unaligned */ >> *d = y; /* Does not work for unaligned */ > > Why not? Because "int *" does not have the packed attribute. -- To unsubscribe from this list: send the line "unsubscribe linux-wireless" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html