Skip to contentSkip to conversation

VMCI: Fix process-to-process DRGAMs.

PATCH New Andy King 1 participant 1 message Mar 7, 2013

Subsystems (3)
lore
Share & tools
lore

Andy King

author
#0 lore raw

PATCH 1/1 VMCI: Fix process-to-process DRGAMs.

When sending between processes, we always schedule a work item. Our work info struct has the message embedded in the middle, which means that we end up overwriting subsequent fields when we copy the (variable-length) message into it. Move it to the end of the struct.

---
 drivers/misc/vmw_vmci/vmci_datagram.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
drivers/misc/vmw_vmci/vmci_datagram.c +3 -1
index ed5c433..f3cdd90 100644
@@ -42,9 +42,11 @@ struct datagram_entry {
 
 struct delayed_datagram_info {
 	struct datagram_entry *entry;
-	struct vmci_datagram msg;
 	struct work_struct work;
 	bool in_dg_host_queue;
+	/* msg and msg_payload must be together. */
+	struct vmci_datagram msg;
+	u8 msg_payload[];
 };
 
 /* Number of in-flight host->host datagrams */
Signature · 1 line
1.7.4.1