net/bnxt: fix null dereference in session cleanup
[dpdk.git] / lib / vhost / vhost_user.h
index c8e299e..c946cc2 100644 (file)
@@ -149,9 +149,17 @@ typedef struct VhostUserMsg {
                VhostUserVringArea area;
                VhostUserInflight inflight;
        } payload;
+       /* Nothing should be added after the payload */
+} __rte_packed VhostUserMsg;
+
+/* Note: this structure and VhostUserMsg can't be changed carelessly as
+ * external message handlers rely on them.
+ */
+struct __rte_packed vhu_msg_context {
+       VhostUserMsg msg;
        int fds[VHOST_MEMORY_MAX_NREGIONS];
        int fd_num;
-} __rte_packed VhostUserMsg;
+};
 
 #define VHOST_USER_HDR_SIZE offsetof(VhostUserMsg, payload.u64)