From: Dexuan Cui <decui@microsoft.com>
To: Michael Kelley <mikelley@microsoft.com>,
KY Srinivasan <kys@microsoft.com>,
Haiyang Zhang <haiyangz@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"sashal@kernel.org" <sashal@kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Sasha Levin <Alexander.Levin@microsoft.com>
Cc: Sunil Muthuswamy <sunilmut@microsoft.com>,
Andrea Parri <Andrea.Parri@microsoft.com>
Subject: RE: [PATCH] Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23)
Date: Sun, 19 Jan 2020 23:35:32 +0000 [thread overview]
Message-ID: <HK0P153MB01480CADCA0A021A78C874C3BF330@HK0P153MB0148.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <MW2PR2101MB10524758141F09806D8677FCD7300@MW2PR2101MB1052.namprd21.prod.outlook.com>
> From: Michael Kelley
> Sent: Saturday, January 18, 2020 9:29 AM
> > +
> > + /* Linux ignores some messages, e.g.
> CHANNELMSG_TL_CONNECT_RESULT. */
> > + if (!entry->message_handler)
> > + goto msg_handled;
> > +
>
> FWIW, with this new check, all of the validity checks in vmbus_onmessage()
> are redundant and could be removed. There's already a check here that
> ensures msgtype won't be too big, and this new check ensures that
> message_handler is not NULL.
Agreed. I just sent a v2 that removes the redundant code.
> > if (entry->handler_type == VMHT_BLOCKING) {
> > ctx = kmalloc(sizeof(*ctx), GFP_ATOMIC);
> > if (ctx == NULL)
> > diff --git a/include/linux/hyperv.h b/include/linux/hyperv.h
> > index 26f3aeeae1ca..41c58011431e 100644
> > --- a/include/linux/hyperv.h
> > +++ b/include/linux/hyperv.h
> > @@ -425,6 +425,8 @@ enum vmbus_channel_message_type {
> > CHANNELMSG_19 = 19,
> > CHANNELMSG_20 = 20,
> > CHANNELMSG_TL_CONNECT_REQUEST = 21,
> > + CHANNELMSG_22 = 22,
> > + CHANNELMSG_TL_CONNECT_RESULT = 23,
> > CHANNELMSG_COUNT
> > };
>
> For completeness, I'd like to see the channel_message_table also updated
> with these new entries so that everything stays in sync and is explicitly
> defined.
>
> Michael
I fixed this in v2 as well.
Thanks!
Dexuan
prev parent reply other threads:[~2020-01-19 23:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-01-10 1:25 [PATCH] Drivers: hv: vmbus: Ignore CHANNELMSG_TL_CONNECT_RESULT(23) Dexuan Cui
2020-01-18 17:29 ` Michael Kelley
2020-01-19 23:35 ` Dexuan Cui [this message]
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=HK0P153MB01480CADCA0A021A78C874C3BF330@HK0P153MB0148.APCP153.PROD.OUTLOOK.COM \
--to=decui@microsoft.com \
--cc=Alexander.Levin@microsoft.com \
--cc=Andrea.Parri@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
--cc=sunilmut@microsoft.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;
as well as URLs for NNTP newsgroup(s).