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.
Unified · Split
| @@ -42,9 +42,11 @@ struct datagram_entry { · 41 unmodified lines | ||
| 42 | 42 | |
| 43 | 43 | struct delayed_datagram_info { |
| 44 | 44 | struct datagram_entry *entry; |
| 45 | − struct vmci_datagram msg; | |
| 46 | 45 | struct work_struct work; |
| 47 | 46 | bool in_dg_host_queue; |
| 47 | + /* msg and msg_payload must be together. */ | |
| 48 | + struct vmci_datagram msg; | |
| 49 | + u8 msg_payload[]; | |
| 48 | 50 | }; |
| 49 | 51 | |
| 50 | 52 | /* Number of in-flight host->host datagrams */ |