[patch 2/7] USB gadget rndis: fix struct rndis_packet_msg_type unaligned bug

[email protected]
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
From: "Wu, Bryan" <[email protected]>

skb_push function may return a pointer which is not aligned as required
by struct rndis_packet_msg_type. Using attribute trick to fix this bug.

Signed-off-by: Roy Huang <[email protected]>
Signed-off-by: Jie Zhang <[email protected]>
Signed-off-by: Bryan Wu <[email protected]>
Cc: David Brownell <[email protected]>
Cc: Greg KH <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
---

 drivers/usb/gadget/rndis.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff -puN drivers/usb/gadget/rndis.h~usb-gadget-rndis-fix-struct-rndis_packet_msg_type drivers/usb/gadget/rndis.h
--- a/drivers/usb/gadget/rndis.h~usb-gadget-rndis-fix-struct-rndis_packet_msg_type
+++ a/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
 {
_

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.