---------- Forwarded Message ----------
Subject: [PATCH] USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug Date: Thursday 05 April 2007 9:02 pm From: "Wu, Bryan" <[EMAIL PROTECTED]> To: David Brownell <[EMAIL PROTECTED]>, [EMAIL PROTECTED], [EMAIL PROTECTED], linux-kernel@vger.kernel.org, Andrew Morton <[EMAIL PROTECTED]>, [EMAIL PROTECTED] On packet RX paths, skb_push() may return a pointer which is not aligned as needed to access it as a "struct rndis_packet_msg_type". This fixes the bug by declaring that structure as packed, so that the issue won't appear on the RX path or any other path. Signed-off-by: Roy Huang <[EMAIL PROTECTED]> Signed-off-by: Jie Zhang <[EMAIL PROTECTED]> Signed-off-by: Bryan Wu <[EMAIL PROTECTED]> Signed-off-by: David Brownell <[EMAIL PROTECTED]> --- drivers/usb/gadget/rndis.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) --- a/drivers/usb/gadget/rndis.h +++ b/drivers/usb/gadget/rndis.h @@ -195,7 +195,7 @@ struct rndis_packet_msg_type __le32 PerPacketInfoLength; __le32 VcHandle; __le32 Reserved; -}; +} __attribute__ ((packed)); struct rndis_config_parameter { -- ------------------------------------------------------- ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel