From: kys@exchange.microsoft.com
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
devel@linuxdriverproject.org, olaf@aepfle.de, apw@canonical.com,
vkuznets@redhat.com, jasowang@redhat.com,
leann.ogasawara@canonical.com, marcelo.cerri@canonical.com,
sthemmin@microsoft.com
Cc: Stephen Hemminger <stephen@networkplumber.org>,
"K . Y . Srinivasan" <kys@microsoft.com>
Subject: [PATCH 2/3] vmbus: initialize reserved fields in messages
Date: Thu, 5 Oct 2017 17:35:05 -0700 [thread overview]
Message-ID: <20171006003506.24444-2-kys@exchange.microsoft.com> (raw)
In-Reply-To: <20171006003506.24444-1-kys@exchange.microsoft.com>
From: Stephen Hemminger <stephen@networkplumber.org>
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>
---
drivers/hv/channel.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/hv/channel.c b/drivers/hv/channel.c
index efd5db743319..9f48f454bde0 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;
--
2.14.1
next prev parent reply other threads:[~2017-10-06 0:36 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-06 0:33 [PATCH 0/3] Drivers: hv: vmbus: Miscellaneous enhancements and fixes kys
2017-10-06 0:35 ` [PATCH 1/3] Drivers: hv: vmbus: Expose per-channel interrupts and events counters kys
2017-10-06 0:35 ` kys [this message]
2017-10-06 0:35 ` [PATCH 3/3] Drivers: hv: vmbus: Make pannic reporting to be more useful kys
2017-10-12 13:39 ` Vitaly Kuznetsov
2017-10-12 15:06 ` KY Srinivasan
2017-10-20 13:27 ` [PATCH 1/3] Drivers: hv: vmbus: Expose per-channel interrupts and events counters Greg KH
2017-10-20 13:28 ` [PATCH 0/3] Drivers: hv: vmbus: Miscellaneous enhancements and fixes Greg KH
2017-10-20 21:35 ` KY Srinivasan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171006003506.24444-2-kys@exchange.microsoft.com \
--to=kys@exchange.microsoft.com \
--cc=apw@canonical.com \
--cc=devel@linuxdriverproject.org \
--cc=gregkh@linuxfoundation.org \
--cc=jasowang@redhat.com \
--cc=kys@microsoft.com \
--cc=leann.ogasawara@canonical.com \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.cerri@canonical.com \
--cc=olaf@aepfle.de \
--cc=stephen@networkplumber.org \
--cc=sthemmin@microsoft.com \
--cc=vkuznets@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox