diff options
author | Andy King <acking@vmware.com> | 2013-03-07 07:29:08 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-15 12:58:12 -0700 |
commit | 347e0899b1c75d907f01ac883ca38d37fe9bfa42 (patch) | |
tree | 74b1b63235134845774d4f9b73952944fb271120 /drivers/misc | |
parent | 61ec7e77d724f3150338ecaa2d16d4379b7498b1 (diff) | |
download | op-kernel-dev-347e0899b1c75d907f01ac883ca38d37fe9bfa42.zip op-kernel-dev-347e0899b1c75d907f01ac883ca38d37fe9bfa42.tar.gz |
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.
Acked-by: Dmitry Torokhov <dtor@vmware.com>
Signed-off-by: Andy King <acking@vmware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/vmw_vmci/vmci_datagram.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/misc/vmw_vmci/vmci_datagram.c b/drivers/misc/vmw_vmci/vmci_datagram.c index ed5c433..f3cdd90 100644 --- a/drivers/misc/vmw_vmci/vmci_datagram.c +++ b/drivers/misc/vmw_vmci/vmci_datagram.c @@ -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 */ |