Re: [RFC PATCH] scsi: storvsc: Fix validation for unsolicited incoming packets

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > 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@xxxxxxxxxxxxx>
> The tag was meant to be:
> Reviewed-by: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>

Thank you, Haiyang.  I'll update as suggested.

  Andrea



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]

  Powered by Linux