summaryrefslogtreecommitdiff
path: root/drivers/hv/channel.c
diff options
context:
space:
mode:
authorStephen Hemminger <stephen@networkplumber.org>2017-10-06 03:35:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-10-20 16:27:24 +0300
commit33d426a957dfc9bea13c4e05d0319b1d0a854586 (patch)
tree53a0254e03007f05ef036ad630ac991aa80e6f31 /drivers/hv/channel.c
parentad146e37d2a2f1cbf16bf4c7bbb9362f009a1480 (diff)
downloadlinux-33d426a957dfc9bea13c4e05d0319b1d0a854586.tar.xz
vmbus: initialize reserved fields in messages
Make sure and initialize reserved fields in messages to host, rather than passing stack junk. Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com> Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/hv/channel.c')
-rw-r--r--drivers/hv/channel.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index 894b67ac2cae..a406beb10dd0 100644
--- a/drivers/hv/channel.c
+++ b/drivers/hv/channel.c
@@ -745,6 +745,7 @@ int vmbus_sendpacket_pagebuffer(struct vmbus_channel *channel,
desc.dataoffset8 = descsize >> 3; /* in 8-bytes granularity */
desc.length8 = (u16)(packetlen_aligned >> 3);
desc.transactionid = requestid;
+ desc.reserved = 0;
desc.rangecount = pagecount;
for (i = 0; i < pagecount; i++) {
@@ -788,6 +789,7 @@ int vmbus_sendpacket_mpb_desc(struct vmbus_channel *channel,
desc->dataoffset8 = desc_size >> 3; /* in 8-bytes granularity */
desc->length8 = (u16)(packetlen_aligned >> 3);
desc->transactionid = requestid;
+ desc->reserved = 0;
desc->rangecount = 1;
bufferlist[0].iov_base = desc;