Commit 33d426a9 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by Greg Kroah-Hartman

vmbus: initialize reserved fields in messages

Make sure and initialize reserved fields in messages to host,
rather than passing stack junk.
Signed-off-by: default avatarStephen Hemminger <sthemmin@microsoft.com>
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent ad146e37
...@@ -745,6 +745,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel, ...@@ -745,6 +745,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */ desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
desc.length8 = (u16)(packetlen_aligned >> 3); desc.length8 = (u16)(packetlen_aligned >> 3);
desc.transactionid = requestid; desc.transactionid = requestid;
desc.reserved = 0;
desc.rangecount = pagecount; desc.rangecount = pagecount;
for (i = 0; i < pagecount; i++) { for (i = 0; i < pagecount; i++) {
...@@ -788,6 +789,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel, ...@@ -788,6 +789,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
desc->dataoffset8 = desc_size >> 3; /* in 8-bytes granularity */ desc->dataoffset8 = desc_size >> 3; /* in 8-bytes granularity */
desc->length8 = (u16)(packetlen_aligned >> 3); desc->length8 = (u16)(packetlen_aligned >> 3);
desc->transactionid = requestid; desc->transactionid = requestid;
desc->reserved = 0;
desc->rangecount = 1; desc->rangecount = 1;
bufferlist[0].iov_base = desc; bufferlist[0].iov_base = desc;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment