From: Andrea Parri <parri.andrea@gmail.com>
To: Haiyang Zhang <haiyangz@microsoft.com>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
Wei Liu <wei.liu@kernel.org>,
"James E . J . Bottomley" <jejb@linux.ibm.com>,
"Martin K . Petersen" <martin.petersen@oracle.com>,
Michael Kelley <mikelley@microsoft.com>,
Dexuan Cui <decui@microsoft.com>
Subject: Re: [RFC PATCH] scsi: storvsc: Fix validation for unsolicited incoming packets
Date: Wed, 29 Sep 2021 15:55:48 +0200 [thread overview]
Message-ID: <20210929135508.GA3258@anparri> (raw)
In-Reply-To: <BN8PR21MB1284DC9279AC61FE0C267C5ACAA99@BN8PR21MB1284.namprd21.prod.outlook.com>
> > The patch looks good. But for readability, I'd suggested put the length
> > checks together like this:
> >
> > u32 minlen = rqst_id ? sizeof(struct vstor_packet) -
> > stor_device->vmscsi_size_delta : VSTOR_MIN_UNSOL_PKT_SIZE;
> >
> > if (pktlen < minlen) {
> > dev_err(&device->device,
> > "Invalid pkt: id=%llu, len=%u, minlen=%u\n",
> > rqst_id, pktlen, minlen);
> > continue;
> > }
> >
> > Thanks.
> >
> > Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
> The tag was meant to be:
> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
Thank you, Haiyang. I'll update as suggested.
Andrea
prev parent reply other threads:[~2021-09-29 13:56 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 16:37 [RFC PATCH] scsi: storvsc: Fix validation for unsolicited incoming packets Andrea Parri (Microsoft)
2021-09-28 22:05 ` Haiyang Zhang
2021-09-29 13:33 ` Haiyang Zhang
2021-09-29 13:55 ` Andrea Parri [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=20210929135508.GA3258@anparri \
--to=parri.andrea@gmail.com \
--cc=decui@microsoft.com \
--cc=haiyangz@microsoft.com \
--cc=jejb@linux.ibm.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=mikelley@microsoft.com \
--cc=sthemmin@microsoft.com \
--cc=wei.liu@kernel.org \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.