[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20210929135508.GA3258@anparri>
Date: Wed, 29 Sep 2021 15:55:48 +0200
From: Andrea Parri <parri.andrea@...il.com>
To: Haiyang Zhang <haiyangz@...rosoft.com>
Cc: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-hyperv@...r.kernel.org" <linux-hyperv@...r.kernel.org>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
KY Srinivasan <kys@...rosoft.com>,
Stephen Hemminger <sthemmin@...rosoft.com>,
Wei Liu <wei.liu@...nel.org>,
"James E . J . Bottomley" <jejb@...ux.ibm.com>,
"Martin K . Petersen" <martin.petersen@...cle.com>,
Michael Kelley <mikelley@...rosoft.com>,
Dexuan Cui <decui@...rosoft.com>
Subject: Re: [RFC PATCH] scsi: storvsc: Fix validation for unsolicited
incoming packets
> > 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@...rosoft.com>
> The tag was meant to be:
> Reviewed-by: Haiyang Zhang <haiyangz@...rosoft.com>
Thank you, Haiyang. I'll update as suggested.
Andrea
Powered by blists - more mailing lists